diff options
author | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-09-24 20:49:31 +0000 |
---|---|---|
committer | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-09-24 20:49:31 +0000 |
commit | 8afb23270d23db6a033ba8fb77e1cf1a1d925a7c (patch) | |
tree | b7ed2e950b1b35de067464525dccaf95f2876cfd /toolchain | |
parent | 1d072248383ae47bd68032d69bd86cc060796ef4 (diff) |
new (last?) attempt at standardizing Makefiles
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4855 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/ext2fs/Makefile | 8 | ||||
-rw-r--r-- | toolchain/ipkg-utils/Makefile | 23 | ||||
-rw-r--r-- | toolchain/jffs2/Makefile | 11 | ||||
-rw-r--r-- | toolchain/kernel-headers/Makefile | 2 | ||||
-rw-r--r-- | toolchain/libnotimpl/Makefile | 9 | ||||
-rw-r--r-- | toolchain/lzma/Makefile | 15 | ||||
-rw-r--r-- | toolchain/mkimage/Makefile | 5 | ||||
-rw-r--r-- | toolchain/sed/Makefile | 7 | ||||
-rw-r--r-- | toolchain/squashfs/Makefile | 19 | ||||
-rw-r--r-- | toolchain/sstrip/Makefile | 7 |
10 files changed, 62 insertions, 44 deletions
diff --git a/toolchain/ext2fs/Makefile b/toolchain/ext2fs/Makefile index eebf7a2c8..dd60a7eb9 100644 --- a/toolchain/ext2fs/Makefile +++ b/toolchain/ext2fs/Makefile @@ -11,12 +11,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=genext2fs PKG_VERSION:=1.4rc1 -PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_MD5SUM:=664431bf6737df1c265500e1f0b5d40c PKG_CAT:=zcat +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + include $(INCLUDE_DIR)/host-build.mk define Build/Configure @@ -45,7 +46,12 @@ define Build/Compile endef define Build/Install + mkdir -p $(STAGING_DIR)/bin install -m0755 $(PKG_BUILD_DIR)/genext2fs $(STAGING_DIR)/bin/ endef +define Build/Clean + rm -f $(STAGING_DIR)/bin/genext2fs +endef + $(eval $(call HostBuild)) diff --git a/toolchain/ipkg-utils/Makefile b/toolchain/ipkg-utils/Makefile index 4520af176..06bb2adc0 100644 --- a/toolchain/ipkg-utils/Makefile +++ b/toolchain/ipkg-utils/Makefile @@ -6,15 +6,15 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := ipkg-utils -PKG_VERSION := 1.7 +PKG_NAME:=ipkg-utils +PKG_VERSION:=1.7 -PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM := da3e3ef772973d7370a6ac95f0fef9b8 -PKG_SOURCE_URL := http://handhelds.org/packages/ipkg-utils/ -PKG_CAT := zcat +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://handhelds.org/packages/ipkg-utils/ +PKG_MD5SUM:=da3e3ef772973d7370a6ac95f0fef9b8 +PKG_CAT:=zcat -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk @@ -23,16 +23,15 @@ define Build/Install echo "dest root /" > $(STAGING_DIR)/etc/ipkg.conf echo "option offline_root $(TARGET_DIR)" >> $(STAGING_DIR)/etc/ipkg.conf mkdir -p $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg-build $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg-buildpackage $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg-make-index $(STAGING_DIR)/usr/bin - install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin + install -m0755 $(PKG_BUILD_DIR)/ipkg-build $(STAGING_DIR)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/ipkg-buildpackage $(STAGING_DIR)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/ipkg-make-index $(STAGING_DIR)/usr/bin/ + install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin/ endef define Build/Clean rm -f $(STAGING_DIR)/etc/ipkg.conf rm -f $(STAGING_DIR)/usr/bin/ipkg* - rm -rf $(PKG_BUILD_DIR) endef $(eval $(call HostBuild)) diff --git a/toolchain/jffs2/Makefile b/toolchain/jffs2/Makefile index 93e2589c2..a0a26776f 100644 --- a/toolchain/jffs2/Makefile +++ b/toolchain/jffs2/Makefile @@ -10,20 +10,25 @@ PKG_NAME:=mtd PKG_VERSION:=20050122 PKG_SOURCE=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 PKG_SOURCE_URL=http://ftp.debian.org/debian/pool/main/m/mtd +PKG_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 PKG_CAT:=zcat -PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/mtd-20050122.orig +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).orig include $(INCLUDE_DIR)/host-build.mk define Build/Compile - $(MAKE) LINUXDIR=$(LINUX_HEADERS_DIR) -C $(PKG_BUILD_DIR)/util + $(MAKE) -C $(PKG_BUILD_DIR)/util LINUXDIR=$(LINUX_HEADERS_DIR) endef define Build/Install + mkdir -p $(STAGING_DIR)/bin $(CP) $(PKG_BUILD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/ endef +define Build/Clean + rm -f $(STAGING_DIR)/bin/mkfs.jffs2 +endef + $(eval $(call HostBuild)) diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index da525d5f3..42791f1e1 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -10,12 +10,12 @@ PKG_NAME=kernel-headers PKG_VERSION=2.4.32 PKG_SOURCE=linux-$(PKG_VERSION).tar.bz2 -PKG_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c PKG_SOURCE_URL= \ http://www.de.kernel.org/pub/linux/kernel/v2.4 \ http://www.fi.kernel.org/pub/linux/kernel/v2.4 \ http://www.fr.kernel.org/pub/linux/kernel/v2.4 \ http://www.kernel.org/pub/linux/kernel/v2.4 +PKG_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/linux-$(PKG_VERSION) diff --git a/toolchain/libnotimpl/Makefile b/toolchain/libnotimpl/Makefile index bc515ca08..d55bf4e3f 100644 --- a/toolchain/libnotimpl/Makefile +++ b/toolchain/libnotimpl/Makefile @@ -6,8 +6,9 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := libnotimpl -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/libnotimpl +PKG_NAME:=libnotimpl + +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/libnotimpl include $(INCLUDE_DIR)/host-build.mk @@ -31,9 +32,7 @@ define Build/Install endef define Build/Clean - rm -rf \ - $(STAGING_DIR)/usr/lib/libnotimpl.a \ - $(PKG_BUILD_DIR) + rm -f $(STAGING_DIR)/usr/lib/libnotimpl.a endef $(eval $(call HostBuild)) diff --git a/toolchain/lzma/Makefile b/toolchain/lzma/Makefile index ab8fea0e6..47f21d1f0 100644 --- a/toolchain/lzma/Makefile +++ b/toolchain/lzma/Makefile @@ -6,14 +6,14 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := lzma -PKG_VERSION := 432 +PKG_NAME:=lzma +PKG_VERSION:=432 -PKG_SOURCE := $(PKG_NAME)$(PKG_VERSION).tar.bz2 -PKG_MD5SUM := 155c1ebce5bc6710ae7ecc926226d9d7 -PKG_SOURCE_URL := @SF/sevenzip +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/sevenzip +PKG_MD5SUM:=155c1ebce5bc6710ae7ecc926226d9d7 -PKG_BUILD_DIR=$(TOOL_BUILD_DIR)/lzma-$(PKG_VERSION)/lzma +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lzma include $(INCLUDE_DIR)/host-build.mk @@ -33,11 +33,12 @@ endef define Build/Install mkdir -p $(STAGING_DIR)/host/lib $(CP) $(LIB_DIR)/liblzma.a $(STAGING_DIR)/host/lib/ + mkdir -p $(STAGING_DIR)/bin $(CP) $(ALONE_DIR)/lzma $(STAGING_DIR)/bin/ endef define Build/Clean - rm -f $(PKG_BUILD_DIR)/liblzma.a $(PKG_BUILD_DIR)/lzma + rm -f $(STAGING_DIR)/host/lib/liblzma.a $(STAGING_DIR)/bin/lzma endef $(eval $(call HostBuild)) diff --git a/toolchain/mkimage/Makefile b/toolchain/mkimage/Makefile index ec27e2716..71285d2e1 100644 --- a/toolchain/mkimage/Makefile +++ b/toolchain/mkimage/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/host-build.mk -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/mkimage +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/mkimage define Build/Compile $(CC) -O -c src/crc32.c -o $(PKG_BUILD_DIR)/crc32.o @@ -16,7 +16,8 @@ define Build/Compile endef define Build/Install - $(CP) $(PKG_BUILD_DIR)/mkimage $(STAGING_DIR)/bin + mkdir -p $(STAGING_DIR)/bin + $(CP) $(PKG_BUILD_DIR)/mkimage $(STAGING_DIR)/bin/ endef define Build/Clean diff --git a/toolchain/sed/Makefile b/toolchain/sed/Makefile index fdeeeea2a..b3169918b 100644 --- a/toolchain/sed/Makefile +++ b/toolchain/sed/Makefile @@ -6,14 +6,15 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := sed -PKG_VERSION := 4.1.2 +PKG_NAME:=sed +PKG_VERSION:=4.1.2 + PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/$(PKG_NAME) PKG_MD5SUM:=928f0e06422f414091917401f1a834d0 PKG_CAT:=zcat -PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/sed-$(PKG_VERSION) +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) HOST_SED_TARGET=$(strip $(shell ./sedcheck.sh)) diff --git a/toolchain/squashfs/Makefile b/toolchain/squashfs/Makefile index ac5edd996..8e37a1521 100644 --- a/toolchain/squashfs/Makefile +++ b/toolchain/squashfs/Makefile @@ -6,15 +6,15 @@ # include $(TOPDIR)/rules.mk -PKG_NAME := squashfs -PKG_VERSION := 3.0 +PKG_NAME:=squashfs +PKG_VERSION:=3.0 -PKG_SOURCE := $(PKG_NAME)$(PKG_VERSION).tar.gz -PKG_SOURCE_URL := @SF/squashfs -PKG_MD5SUM := 9fd05d0bfbb712f5fb95edafea5bc733 -PKG_CAT := zcat +PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/squashfs +PKG_MD5SUM:=9fd05d0bfbb712f5fb95edafea5bc733 +PKG_CAT:=zcat -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/squashfs$(PKG_VERSION) +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk @@ -23,7 +23,12 @@ define Build/Compile endef define Build/Install + mkdir -p $(STAGING_DIR)/bin $(CP) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/ endef +define Build/Clean + rm -f $(STAGING_DIR)/bin/mksquashfs-lzma +endef + $(eval $(call HostBuild)) diff --git a/toolchain/sstrip/Makefile b/toolchain/sstrip/Makefile index 49983e912..dc3ff4f6d 100644 --- a/toolchain/sstrip/Makefile +++ b/toolchain/sstrip/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/host-build.mk -PKG_BUILD_DIR := $(TOOL_BUILD_DIR)/sstrip +PKG_BUILD_DIR:=$(TOOL_BUILD_DIR)/sstrip OS:=$(shell uname) ifeq ($(OS),Darwin) -CFLAGS += -I./include + CFLAGS += -I./include endif define Build/Compile @@ -19,7 +19,8 @@ define Build/Compile endef define Build/Install - $(CP) $(PKG_BUILD_DIR)/sstrip $(STAGING_DIR)/bin + mkdir -p $(STAGING_DIR)/bin + $(CP) $(PKG_BUILD_DIR)/sstrip $(STAGING_DIR)/bin/ endef define Build/Clean |