aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-12-06 23:41:38 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-12-06 23:41:38 +0000
commitfdd78f5e21b405573d20e351d591c0ae75474b8e (patch)
tree5e1f0d094a1372545fe6f3a2d6448972391ab09b /tools/firmware-utils/Makefile
parent5272c784c176e2bc9ab6fc27d8d88f46ecfeead1 (diff)
downloadmaster-187ad058-fdd78f5e21b405573d20e351d591c0ae75474b8e.tar.gz
master-187ad058-fdd78f5e21b405573d20e351d591c0ae75474b8e.tar.bz2
master-187ad058-fdd78f5e21b405573d20e351d591c0ae75474b8e.zip
move target/utils to tools/firmware-utils
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5702 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/firmware-utils/Makefile')
-rw-r--r--tools/firmware-utils/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
new file mode 100644
index 0000000000..7b612aeac1
--- /dev/null
+++ b/tools/firmware-utils/Makefile
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+PKG_NAME := firmware-utils
+PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/firmware-utils
+
+CFLAGS := -O2 -I $(STAGING_DIR)/include-host -include endian.h
+
+define cc
+ $(CC) $(CFLAGS) -o $(PKG_BUILD_DIR)/bin/$(1) src/$(1).c
+endef
+
+define Build/Compile
+ mkdir -p $(PKG_BUILD_DIR)/bin
+ $(call cc,addpattern)
+ $(call cc,trx)
+ $(call cc,motorola-bin)
+ $(call cc,dgfirmware)
+ $(call cc,trx2usr)
+endef
+
+define Build/Install
+ $(CP) $(PKG_BUILD_DIR)/bin/* $(STAGING_DIR)/bin
+endef
+
+$(eval $(call HostBuild))