2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
9 TARGETS
:= addpattern trx motorola-bin dgfirmware
11 UTILS_BUILD_DIR
:=$(BUILD_DIR
)/target-utils
14 prepare
: $(UTILS_BUILD_DIR
)
15 compile
: prepare
$(patsubst %,$(UTILS_BUILD_DIR
)/%,$(TARGETS
)) FORCE
16 mkdir
-p
$(STAGING_DIR
)/bin
17 $(CP
) $(UTILS_BUILD_DIR
)/* $(STAGING_DIR
)/bin
/
21 rm -rf
$(UTILS_BUILD_DIR
)
22 for f in
$(TARGETS
); do \
23 rm -f
$(STAGING_DIR
)/bin
/$$f ; \
27 mkdir
-p
$(UTILS_BUILD_DIR
)
29 $(UTILS_BUILD_DIR
)/%: src
/%.c
30 $(CC
) -O2
-I
$(STAGING_DIR
)/include-host
-o
$@
$(patsubst $(UTILS_BUILD_DIR
)/%,src
/%.c
,$@
)