add some fixes for compiling on mac os x
[openwrt.git] / toolchain / utils / Makefile
1 include $(TOPDIR)/rules.mk
2
3 TARGETS:=sstrip
4 UTILS_BUILD_DIR:=$(TOOL_BUILD_DIR)/utils
5
6 OS:=$(shell uname)
7 ifeq ($(OS),Darwin)
8 CFLAGS += -I./include
9 endif
10
11 prepare: $(UTILS_BUILD_DIR)
12 compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS))
13 install: compile
14 mkdir -p $(STAGING_DIR)/bin
15 cp -a $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/
16 package:
17 clean:
18 rm -rf $(UTILS_BUILD_DIR)
19
20 $(UTILS_BUILD_DIR):
21 mkdir -p $(UTILS_BUILD_DIR)
22
23 $(UTILS_BUILD_DIR)/%: src/%.c
24 $(CC) $(CFLAGS) -o $@ $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@)
25 chmod 755 $@
26
This page took 0.056837 seconds and 5 git commands to generate.