
$(BUILD)/%.h:
	@mkdir -p $(dir $@)
	@touch $@

$(BUILD)/%.o: %.c
	@mkdir -p $(dir $@)
	$(CC) $(BUILD_FLAGS) $(BUILD_DEFINES) $(BUILD_INCLUDES) $< -o $@

$(BUILD)/contrib/%.o: ../../lwip2-contrib-src/%.c
	@mkdir -p $(dir $@)
	$(CC) $(BUILD_FLAGS) $(BUILD_DEFINES) $(BUILD_INCLUDES) $< -o $@

$(LWIP_LIB): $(BUILD)/user_config.h $(OBJ)
	$(AR) cru $@ $(OBJ)
