root/trunk/freewrt/tools/brcm-utils/Makefile

Revision 3084, 0.9 kB (checked in by tg, 5 years ago)

link these against libmirmake on Darwin, because the former's getopt(3)
(from MirBSD of course) is more capable than the latter (from FreeBSD?)

Line 
1 # $FreeWRT$
2 #-
3 # This file is part of the FreeWRT project. FreeWRT is copyrighted
4 # material, please see the LICENCE file in the top-level directory
5 # or at http://www.freewrt.org/licence for details.
6
7 include $(TOPDIR)/rules.mk
8 include ../rules.mk
9
10 TARGETS=        addpattern trx motorola-bin dgfirmware
11 ifeq (${OStype},Darwin)
12 LIBS+=          -L${STAGING_TOOLS}/share/bmake -lmirmake
13 endif
14
15 UTILS_BUILD_DIR:=$(TOOLS_BUILD_DIR)/utils
16
17 prepare: $(UTILS_BUILD_DIR)
18 compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS))
19         mkdir -p $(STAGING_TOOLS)/bin
20         $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_TOOLS)/bin/
21 install:
22 package:
23 clean:
24         rm -rf $(UTILS_BUILD_DIR)
25         for f in $(TARGETS); do \
26                 rm -f $(STAGING_TOOLS)/bin/$$f ; \
27         done
28
29 $(UTILS_BUILD_DIR):
30         mkdir -p $(UTILS_BUILD_DIR)
31
32 $(UTILS_BUILD_DIR)/%: src/%.c
33         $(HOSTCC) -I $(TOPDIR)/scripts $(HOSTCFLAGS) -o $@ \
34             $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@) ${LIBS}
35         chmod 755 $@
Note: See TracBrowser for help on using the browser.