source: freewrt/tools/brcm-utils/Makefile@ edc4fc2

Last change on this file since edc4fc2 was edc4fc2, checked in by Thorsten Glaser <tg@…>, 18 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?)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@3084 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 921 bytes
RevLine 
[65328a3]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
[475ad56]7include $(TOPDIR)/rules.mk
[c2e2d0c]8include ../rules.mk
[475ad56]9
[edc4fc2]10TARGETS= addpattern trx motorola-bin dgfirmware
11ifeq (${OStype},Darwin)
12LIBS+= -L${STAGING_TOOLS}/share/bmake -lmirmake
13endif
[475ad56]14
[807b7c3]15UTILS_BUILD_DIR:=$(TOOLS_BUILD_DIR)/utils
[475ad56]16
17prepare: $(UTILS_BUILD_DIR)
18compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS))
[9baf0a6]19 mkdir -p $(STAGING_TOOLS)/bin
20 $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_TOOLS)/bin/
[99cbe83]21install:
[475ad56]22package:
23clean:
24 rm -rf $(UTILS_BUILD_DIR)
25 for f in $(TARGETS); do \
[9baf0a6]26 rm -f $(STAGING_TOOLS)/bin/$$f ; \
[475ad56]27 done
28
29$(UTILS_BUILD_DIR):
30 mkdir -p $(UTILS_BUILD_DIR)
[edc4fc2]31
[475ad56]32$(UTILS_BUILD_DIR)/%: src/%.c
[ba3f8b9]33 $(HOSTCC) -I $(TOPDIR)/scripts $(HOSTCFLAGS) -o $@ \
[edc4fc2]34 $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@) ${LIBS}
[475ad56]35 chmod 755 $@
Note: See TracBrowser for help on using the repository browser.