X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/f77b88d124ea1c900f9cf5e04046939aad48bbe1..293ad9c61ec69dab1eafa98b2c35c62fc15ccefc:/toolchain/utils/Makefile diff --git a/toolchain/utils/Makefile b/toolchain/utils/Makefile index 404a5e5fd..65e488f4e 100644 --- a/toolchain/utils/Makefile +++ b/toolchain/utils/Makefile @@ -3,19 +3,24 @@ include $(TOPDIR)/rules.mk TARGETS:=sstrip UTILS_BUILD_DIR:=$(TOOL_BUILD_DIR)/utils +OS:=$(shell uname) +ifeq ($(OS),Darwin) +CFLAGS += -I./include +endif + prepare: $(UTILS_BUILD_DIR) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) install: compile mkdir -p $(STAGING_DIR)/bin - cp -a $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ + $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ package: -clean: +clean: FORCE rm -rf $(UTILS_BUILD_DIR) $(UTILS_BUILD_DIR): mkdir -p $(UTILS_BUILD_DIR) $(UTILS_BUILD_DIR)/%: src/%.c - $(CC) -o $@ $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@) + $(CC) $(CFLAGS) -o $@ $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@) chmod 755 $@