summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-06-21 02:16:37 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-06-21 02:16:37 +0000
commit859e8f7f7d8bfbefd610d338d16498190cd51e15 (patch)
tree783ba7c887edb58fc47a47c1d083b5a5e6a30ef3 /package
parent732980a7fd77a207db18af3d441f663b1e54c373 (diff)
build system cleanup. move shared include files into $(TOPDIR)/include, move lzma, mkfs.* into toolchain/
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4032 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/alsa/Makefile4
-rw-r--r--package/base-files/Makefile4
-rw-r--r--package/bridge/Makefile2
-rw-r--r--package/broadcom-wl/Makefile4
-rw-r--r--package/busybox/Makefile2
-rw-r--r--package/diag/Makefile4
-rw-r--r--package/dnsmasq/Makefile2
-rw-r--r--package/dropbear/Makefile2
-rw-r--r--package/ebtables/Makefile2
-rw-r--r--package/fuse/Makefile4
-rw-r--r--package/haserl/Makefile2
-rw-r--r--package/hostap/Makefile4
-rw-r--r--package/hostapd/Makefile2
-rw-r--r--package/iproute2/Makefile2
-rw-r--r--package/ipsec-tools/Makefile2
-rw-r--r--package/ipset/Makefile2
-rw-r--r--package/iptables/Makefile6
-rw-r--r--package/kernel.mk31
-rw-r--r--package/libpcap/Makefile2
-rw-r--r--package/linux-atm/Makefile2
-rw-r--r--package/madwifi/Makefile4
-rw-r--r--package/mini_fo/Makefile4
-rw-r--r--package/mtd/Makefile2
-rw-r--r--package/nvram/Makefile2
-rw-r--r--package/openssl/Makefile2
-rw-r--r--package/openswan/Makefile4
-rw-r--r--package/pcmcia-cs/Makefile2
-rw-r--r--package/ppp/Makefile2
-rw-r--r--package/pptp/Makefile2
-rw-r--r--package/robocfg/Makefile2
-rw-r--r--package/rules.mk300
-rw-r--r--package/shfs/Makefile4
-rw-r--r--package/spca5xx/Makefile4
-rw-r--r--package/switch/Makefile4
-rw-r--r--package/udev/Makefile2
-rw-r--r--package/ueagle-atm/Makefile4
-rw-r--r--package/util-linux/Makefile2
-rw-r--r--package/wireless-tools/Makefile2
-rw-r--r--package/wlcompat/Makefile4
-rw-r--r--package/zd1211/Makefile4
-rw-r--r--package/zlib/Makefile2
41 files changed, 56 insertions, 387 deletions
diff --git a/package/alsa/Makefile b/package/alsa/Makefile
index b1b9997c1..5f6a3305b 100644
--- a/package/alsa/Makefile
+++ b/package/alsa/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=alsa-driver
PKG_VERSION:=1.0.11
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/driver/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_CAT:=bzcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
ifeq ($(LINUX_KARCH),i386)
KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index ec3dc8892..bb2089409 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=base-files
PKG_RELEASE:=8
@@ -12,7 +12,7 @@ ifeq ($(REV),)
REV:=0
endif
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
ifneq ($(DUMP),1)
TARGET:=-$(BOARD)-$(KERNEL)
diff --git a/package/bridge/Makefile b/package/bridge/Makefile
index 65fd8358e..f2b178a61 100644
--- a/package/bridge/Makefile
+++ b/package/bridge/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/bridge
PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/bridge
SECTION:=base
diff --git a/package/broadcom-wl/Makefile b/package/broadcom-wl/Makefile
index 227352b15..6fe22edb0 100644
--- a/package/broadcom-wl/Makefile
+++ b/package/broadcom-wl/Makefile
@@ -1,7 +1,7 @@
# $Id: Makefile 2480 2005-11-14 02:07:33Z nbd $
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=broadcom-wl
PKG_VERSION:=4.80.9.2
@@ -14,7 +14,7 @@ PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
PKG_MD5SUM:=7d9fab2c611369bbe075c3924ea77450
PKG_CAT:=bzcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-brcm-wl
SECTION:=drivers
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index aac9d21e3..6b2e0c5be 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads
PKG_MD5SUM:=19a0b475169335f17e421cf644616fe7
PKG_CAT:=bzcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/busybox
SECTION:=base
diff --git a/package/diag/Makefile b/package/diag/Makefile
index 6fed3b51b..ab28e7218 100644
--- a/package/diag/Makefile
+++ b/package/diag/Makefile
@@ -1,14 +1,14 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=kmod-diag
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-diag
SECTION:=drivers
diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile
index 6efaf370a..a05ec0e22 100644
--- a/package/dnsmasq/Makefile
+++ b/package/dnsmasq/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
PKG_MD5SUM:=489198ec87101087043adc98bbe062dc
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/dnsmasq
SECTION:=base
diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile
index bda4d8fc9..0409e66db 100644
--- a/package/dropbear/Makefile
+++ b/package/dropbear/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/
PKG_MD5SUM:=ca8e53a766faec831882831364568421
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/dropbear
SECTION:=base
diff --git a/package/ebtables/Makefile b/package/ebtables/Makefile
index f4359a667..814ac68a2 100644
--- a/package/ebtables/Makefile
+++ b/package/ebtables/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/ebtables
PKG_MD5SUM:=f07111fcc1966be669278433c35dcc28
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/ebtables
SECTION:=base
diff --git a/package/fuse/Makefile b/package/fuse/Makefile
index 91d4dd607..b7084236d 100644
--- a/package/fuse/Makefile
+++ b/package/fuse/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=fuse
PKG_VERSION:=2.5.3
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-fuse
SECTION:=drivers
diff --git a/package/haserl/Makefile b/package/haserl/Makefile
index e6215c954..ec940ea43 100644
--- a/package/haserl/Makefile
+++ b/package/haserl/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/haserl
PKG_MD5SUM:=bd9195d086566f56634c0bcbbbcbebea
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/haserl
SECTION:=base
diff --git a/package/hostap/Makefile b/package/hostap/Makefile
index 80f820187..21abfe256 100644
--- a/package/hostap/Makefile
+++ b/package/hostap/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=hostap-driver
PKG_VERSION:=0.4.9
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-hostap
SECTION:=drivers
diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile
index 4a1c3f926..867cda692 100644
--- a/package/hostapd/Makefile
+++ b/package/hostapd/Makefile
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/hostapd
SECTION:=net
diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile
index 1fa638d39..9cf1eb990 100644
--- a/package/iproute2/Makefile
+++ b/package/iproute2/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/ip
SECTION:=base
diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile
index 58dccca62..667884deb 100644
--- a/package/ipsec-tools/Makefile
+++ b/package/ipsec-tools/Makefile
@@ -14,7 +14,7 @@ PKG_CAT:=bzcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/ipsec-tools
SECTION:=base
diff --git a/package/ipset/Makefile b/package/ipset/Makefile
index 456f8b6be..d245090a6 100644
--- a/package/ipset/Makefile
+++ b/package/ipset/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=http://ipset.netfilter.org
PKG_MD5SUM:=1709424cc2cdb925d4fb6fd5fcaefc26
PKG_CAT:=bzcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/ipset
SECTION:=base
diff --git a/package/iptables/Makefile b/package/iptables/Makefile
index 623a64ed8..749027744 100644
--- a/package/iptables/Makefile
+++ b/package/iptables/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=iptables
PKG_VERSION:=1.3.5
@@ -20,10 +20,10 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
PKG_MENU:=IPv4 / IPv6 firewall administration
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
ifeq ($(DUMP),)
include $(LINUX_DIR)/.config
-include $(TOPDIR)/target/linux/netfilter.mk
+include $(TOPDIR)/include/netfilter.mk
endif
define Package/iptables
diff --git a/package/kernel.mk b/package/kernel.mk
deleted file mode 100644
index 39f9cc0c9..000000000
--- a/package/kernel.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-ifneq ($(DUMP),1)
-include $(BUILD_DIR)/kernel.mk
-
-KERNEL:=unknown
-ifneq (,$(findstring 2.4.,$(LINUX_VERSION)))
-KERNEL:=2.4
-LINUX_KMOD_SUFFIX=o
-endif
-ifneq (,$(findstring 2.6.,$(LINUX_VERSION)))
-KERNEL:=2.6
-LINUX_KMOD_SUFFIX=ko
-endif
-
-LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
- -e 's/mipsel/mips/' \
- -e 's/mipseb/mips/' \
- -e 's/powerpc/ppc/' \
- -e 's/sh[234]/sh/' \
- -e 's/armeb/arm/' \
-)
-
-KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
-ifeq ($(LINUX_NAME),)
-LINUX_NAME:=linux-$(LINUX_VERSION)
-endif
-LINUX_DIR := $(KERNEL_BUILD_DIR)/$(LINUX_NAME)
-
-KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules
-MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR)
-TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
-endif
diff --git a/package/libpcap/Makefile b/package/libpcap/Makefile
index d4d7e2167..2d7aecf55 100644
--- a/package/libpcap/Makefile
+++ b/package/libpcap/Makefile
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/libpcap
SECTION:=base
diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile
index e37d5bdce..15b3f7d4d 100644
--- a/package/linux-atm/Makefile
+++ b/package/linux-atm/Makefile
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/linux-atm
SECTION:=libs
diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile
index c68905481..7bdb7ec11 100644
--- a/package/madwifi/Makefile
+++ b/package/madwifi/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=madwifi
PKG_VERSION:=0.9.0
@@ -54,7 +54,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \
LDOPTS="" \
DOMULTI=1
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
ifeq ($(findstring AHB,$(BUS)),AHB)
define Build/Compile/ahb
diff --git a/package/mini_fo/Makefile b/package/mini_fo/Makefile
index f2c46c9ec..0180f81c3 100644
--- a/package/mini_fo/Makefile
+++ b/package/mini_fo/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=mini_fo
PKG_VERSION:=0.6.2pre1
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.denx.de/twiki/pub/Know/MiniFOHome/
PKG_SOURCE:=mini_fo-0-6-2-pre1.tar.bz2
PKG_CAT:=bzcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-mini-fo
SECTION:=drivers
diff --git a/package/mtd/Makefile b/package/mtd/Makefile
index f6e94303a..01dfcd6b5 100644
--- a/package/mtd/Makefile
+++ b/package/mtd/Makefile
@@ -7,7 +7,7 @@ PKG_RELEASE:=4
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/mtd
SECTION:=base
diff --git a/package/nvram/Makefile b/package/nvram/Makefile
index 019800a0c..cf76c7c81 100644
--- a/package/nvram/Makefile
+++ b/package/nvram/Makefile
@@ -7,7 +7,7 @@ PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/nvram
SECTION:=base
diff --git a/package/openssl/Makefile b/package/openssl/Makefile
index 82f20d6b0..39fe6b4c3 100644
--- a/package/openssl/Makefile
+++ b/package/openssl/Makefile
@@ -20,7 +20,7 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-rmd160 no-aes192
OPENSSL_OPTIONS:= shared no-ec no-err no-fips no-hw no-krb5 no-threads zlib-dynamic no-engines
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/libopenssl
SECTION:=base
diff --git a/package/openswan/Makefile b/package/openswan/Makefile
index 4a1a42cc0..f81096547 100644
--- a/package/openswan/Makefile
+++ b/package/openswan/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=openswan
PKG_VERSION:=2.4.5
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://www.openswan.org/download
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-openswan
SECTION:=drivers
diff --git a/package/pcmcia-cs/Makefile b/package/pcmcia-cs/Makefile
index a389fd63e..2c7b22978 100644
--- a/package/pcmcia-cs/Makefile
+++ b/package/pcmcia-cs/Makefile
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/pcmcia-cs
SECTION:=base
diff --git a/package/ppp/Makefile b/package/ppp/Makefile
index 55986f95c..edd9a5ea8 100644
--- a/package/ppp/Makefile
+++ b/package/ppp/Makefile
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/ppp
SECTION:=net
diff --git a/package/pptp/Makefile b/package/pptp/Makefile
index 08cb43a7c..6d01ce19f 100644
--- a/package/pptp/Makefile
+++ b/package/pptp/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=@SF/pptpclient
PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/pptp
SECTION:=base
diff --git a/package/robocfg/Makefile b/package/robocfg/Makefile
index 49f600569..ca0f83d3d 100644
--- a/package/robocfg/Makefile
+++ b/package/robocfg/Makefile
@@ -8,7 +8,7 @@ PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/robocfg
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/robocfg
SECTION:=base
diff --git a/package/rules.mk b/package/rules.mk
deleted file mode 100644
index 82298b024..000000000
--- a/package/rules.mk
+++ /dev/null
@@ -1,300 +0,0 @@
-ifneq ($(DUMP),)
- all: dumpinfo
-else
- all: compile
-endif
-
-define Build/DefaultTargets
- ifeq ($(DUMP),)
- ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p $(PKG_BUILD_DIR) . $(TOPDIR)/package/rules.mk),$(PKG_BUILD_DIR))
- ifeq ($(CONFIG_AUTOREBUILD),y)
- $(PKG_BUILD_DIR)/.prepared: package-clean
- endif
- endif
-
- ifneq ($$(shell $(SCRIPT_DIR)/timestamp.pl -p -x ipkg $(IPKG_$(1)) $(PKG_BUILD_DIR)),$(IPKG_$(1)))
- ifeq ($(CONFIG_AUTOREBUILD),y)
- $(PKG_BUILD_DIR)/.built: package-rebuild
- endif
- endif
- endif
-
-
- $(PKG_BUILD_DIR)/.prepared:
- @-rm -rf $(PKG_BUILD_DIR)
- @mkdir -p $(PKG_BUILD_DIR)
- $(call Build/Prepare)
- touch $$@
-
- $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
- $(call Build/Configure)
- touch $$@
-
- $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
- $(call Build/Compile)
- touch $$@
-
- $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed: $(PKG_BUILD_DIR)/.built
- $(call Build/InstallDev)
- touch $$@
-
- ifdef Build/InstallDev
- compile-targets: $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed
- endif
-
- package-clean: FORCE
- $(call Build/Clean)
- $(call Build/UninstallDev)
- rm -f $(STAGING_DIR)/stampfiles/.$(PKG_NAME)-installed
-
- package-rebuild: FORCE
- @-rm -f $(PKG_BUILD_DIR)/.built
-
- define Build/DefaultTargets
- endef
-endef
-
-define Package/Default
- CONFIGFILE:=
- SECTION:=opt
- CATEGORY:=Extra packages
- DEPENDS:=
- MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
- SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
- ifneq ($(PKG_VERSION),)
- ifneq ($(PKG_RELEASE),)
- VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
- else
- VERSION:=$(PKG_VERSION)
- endif
- else
- VERSION:=$(PKG_RELEASE)
- endif
- PKGARCH:=$(ARCH)
- PRIORITY:=optional
- DEFAULT:=
- MENU:=
- TITLE:=
- DESCRIPTION:=
-endef
-
-define BuildIPKGVariable
-pkg_$(subst .,_,$(subst -,_,$(1)))_$(2) = $$(Package/$(1)/$(2))
-export pkg_$(subst .,_,$(subst -,_,$(1))_$(2))
-$(1)_COMMANDS += if [ -n "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" ]; then echo "$$$$$$$$pkg_$(subst .,_,$(subst -,_,$(1)))_$(2)" > $(2); fi;
-endef
-
-define BuildPackage
- $(eval $(call Package/Default))
- $(eval $(call Package/$(1)))
-
- $(foreach FIELD, TITLE CATEGORY PRIORITY VERSION,
- ifeq ($($(FIELD)),)
- $$(error Package/$(1) is missing the $(FIELD) field)
- endif
- )
-
- ifeq ($(PKGARCH),)
- PKGARCH:=$(ARCH)
- endif
-
- ifeq ($(DESCRIPTION),)
- $(eval DESCRIPTION:=$(TITLE))
- endif
-
- IPKG_$(1):=$(PACKAGE_DIR)/$(1)_$(VERSION)_$(PKGARCH).ipk
- IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg/$(1)
- INFO_$(1):=$(IPKG_STATE_DIR)/info/$(1).list
-
- ifeq ($(CONFIG_PACKAGE_$(1)),y)
- install-targets: $$(INFO_$(1))
- endif
-
- ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
- compile-targets: $$(IPKG_$(1))
- endif
-
- IDEPEND_$(1):=$$(strip $$(DEPENDS))
-
- DUMPINFO += \
- echo "Package: $(1)";
-
- ifneq ($(MENU),)
- DUMPINFO += \
- echo "Menu: $(MENU)";
- endif
-
- ifneq ($(DEFAULT),)
- DUMPINFO += \
- echo "Default: $(DEFAULT)";
- endif
-
- DUMPINFO += \
- echo "Version: $(VERSION)"; \
- echo "Depends: $$(IDEPEND_$(1))"; \
- echo "Build-Depends: $(PKG_BUILDDEP)"; \
- echo "Category: $(CATEGORY)"; \
- echo "Title: $(TITLE)"; \
- echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n,g';
-
- ifneq ($(URL),)
- DUMPINFO += \
- echo; \
- echo "$(URL)";
- endif
-
- DUMPINFO += \
- echo "@@";
-
- ifneq ($(CONFIG),)
- DUMPINFO += \
- echo "Config: $(CONFIG)" | sed -e 's,\\,\n,g'; \
- echo "@@";
- endif
-
- $(eval $(call BuildIPKGVariable,$(1),conffiles))
- $(eval $(call BuildIPKGVariable,$(1),preinst))
- $(eval $(call BuildIPKGVariable,$(1),postinst))
- $(eval $(call BuildIPKGVariable,$(1),prerm))
- $(eval $(call BuildIPKGVariable,$(1),postrm))
- $$(IDIR_$(1))/CONTROL/control: $(PKG_BUILD_DIR)/.prepared
- mkdir -p $$(IDIR_$(1))/CONTROL
- echo "Package: $(1)" > $$(IDIR_$(1))/CONTROL/control
- echo "Version: $(VERSION)" >> $$(IDIR_$(1))/CONTROL/control
- ( \
- DEPENDS=; \
- for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \
- DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \
- done; \
- echo "Depends: $$$$DEPENDS" >> $$(IDIR_$(1))/CONTROL/control; \
- )
- echo "Source: $(SOURCE)" >> $$(IDIR_$(1))/CONTROL/control
- echo "Section: $(SECTION)" >> $$(IDIR_$(1))/CONTROL/control
- echo "Priority: $(PRIORITY)" >> $$(IDIR_$(1))/CONTROL/control
- echo "Maintainer: $(MAINTAINER)" >> $$(IDIR_$(1))/CONTROL/control
- echo "Architecture: $(PKGARCH)" >> $$(IDIR_$(1))/CONTROL/control
- echo "Description: $(DESCRIPTION)" | sed -e 's,\\,\n ,g' >> $$(IDIR_$(1))/CONTROL/control
- chmod 644 $$(IDIR_$(1))/CONTROL/control
- (cd $$(IDIR_$(1))/CONTROL; \
- $($(1)_COMMANDS) \
- )
-
- $$(IPKG_$(1)): $$(IDIR_$(1))/CONTROL/control $(PKG_BUILD_DIR)/.built
- $(call Package/$(1)/install,$$(IDIR_$(1)))
- mkdir -p $(PACKAGE_DIR)
- -find $$(IDIR_$(1)) -name CVS | xargs rm -rf
- -find $$(IDIR_$(1)) -name .svn | xargs rm -rf
- -find $$(IDIR_$(1)) -name '.#*' | xargs rm -f
- $(RSTRIP) $$(IDIR_$(1))
- $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
-
- $$(INFO_$(1)): $$(IPKG_$(1))
- $(IPKG) install $$(IPKG_$(1))
-
- $(1)-clean:
- rm -f $(PACKAGE_DIR)/$(1)_*
-
- clean: $(1)-clean
-
- $$(eval $$(call Build/DefaultTargets,$(1)))
-
-endef
-
-ifneq ($(strip $(PKG_CAT)),)
- define Build/Prepare/Default
- @if [ "$(PKG_CAT)" = "unzip" ]; then \
- unzip -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) ; \
- else \
- $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(PKG_BUILD_DIR)/.. $(TAR_OPTIONS) - ; \
- fi
- @if [ -d ./patches ]; then \
- $(PATCH) $(PKG_BUILD_DIR) ./patches ; \
- fi
- endef
-endif
-
-define Build/Prepare
- $(call Build/Prepare/Default)
-endef
-
-define Build/Configure/Default
- @(cd $(PKG_BUILD_DIR)/$(3); \
- [ -x configure ] && \
- $(2) \
- $(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
- LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --program-prefix="" \
- --program-suffix="" \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- $(DISABLE_NLS) \
- $(1); \
- true; \
- )
-endef
-
-define Build/Configure
- $(call Build/Configure/Default,)
-endef
-
-define Build/Compile/Default
- $(MAKE) -C $(PKG_BUILD_DIR) \
- $(TARGET_CONFIGURE_OPTS) \
- CC=$(TARGET_CC) \
- CROSS="$(TARGET_CROSS)" \
- EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \
- ARCH="$(ARCH)" \
- $(1);
-endef
-
-define Build/Compile
- $(call Build/Compile/Default,)
-endef
-
-ifneq ($(DUMP),)
- dumpinfo: FORCE
- @$(DUMPINFO)
-else
- $(PACKAGE_DIR):
- mkdir -p $@
-
- ifneq ($(strip $(PKG_SOURCE)),)
- source: $(DL_DIR)/$(PKG_SOURCE)
-
- $(DL_DIR)/$(PKG_SOURCE):
- mkdir -p $(DL_DIR)
- $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(PKG_SOURCE)" "$(PKG_MD5SUM)" $(PKG_SOURCE_URL)
-
- $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
- endif
-
- source:
- prepare: $(PKG_BUILD_DIR)/.prepared
- configure: $(PKG_BUILD_DIR)/.configured
-
- compile-targets:
- compile: compile-targets
-
- install-targets:
- install: install-targets
-
- clean-targets:
- clean: FORCE
- @$(MAKE) clean-targets
- $(call Build/Clean)
- rm -rf $(PKG_BUILD_DIR)
-endif
diff --git a/package/shfs/Makefile b/package/shfs/Makefile
index 69f8d83a4..057358b34 100644
--- a/package/shfs/Makefile
+++ b/package/shfs/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=shfs
PKG_VERSION:=0.35
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-shfs
SECTION:=drivers
diff --git a/package/spca5xx/Makefile b/package/spca5xx/Makefile
index 93eea633c..86233fc64 100644
--- a/package/spca5xx/Makefile
+++ b/package/spca5xx/Makefile
@@ -1,7 +1,7 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=spca5xx
PKG_VERSION:=20060301
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://mxhaard.free.fr/spca50x/Download/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
#FIXME: add proper dependency handling on kmod-usb-core & kmod-videodev packages
define Package/kmod-spca5xx
diff --git a/package/switch/Makefile b/package/switch/Makefile
index e8aa6a02a..cb5f34674 100644
--- a/package/switch/Makefile
+++ b/package/switch/Makefile
@@ -1,14 +1,14 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=kmod-switch
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-switch
SECTION:=drivers
diff --git a/package/udev/Makefile b/package/udev/Makefile
index 54e06dcff..5d397161b 100644
--- a/package/udev/Makefile
+++ b/package/udev/Makefile
@@ -19,7 +19,7 @@ PKG_CAT:=bzcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/udev
SECTION:=base
diff --git a/package/ueagle-atm/Makefile b/package/ueagle-atm/Makefile
index 6f227a1bf..6d003f6c0 100644
--- a/package/ueagle-atm/Makefile
+++ b/package/ueagle-atm/Makefile
@@ -1,7 +1,7 @@
# $Id: Makefile 2767 2005-12-25 02:10:14Z wbx $
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=ueagle-atm
PKG_VERSION:=1.0d1
@@ -15,7 +15,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
#FIXME: add dependency on kmod-usb-core
define Package/kmod-ueagle-atm
diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile
index ef28bdb69..673ade433 100644
--- a/package/util-linux/Makefile
+++ b/package/util-linux/Makefile
@@ -16,7 +16,7 @@ PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/fdisk
SECTION:=base
diff --git a/package/wireless-tools/Makefile b/package/wireless-tools/Makefile
index ad4eddab8..368d3ebb0 100644
--- a/package/wireless-tools/Makefile
+++ b/package/wireless-tools/Makefile
@@ -14,7 +14,7 @@ PKG_CAT:=zcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/wireless-tools
SECTION:=base
diff --git a/package/wlcompat/Makefile b/package/wlcompat/Makefile
index af1f07593..d5feede6c 100644
--- a/package/wlcompat/Makefile
+++ b/package/wlcompat/Makefile
@@ -1,14 +1,14 @@
# $Id$
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=kmod-wlcompat
PKG_RELEASE:=3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/kmod-wlcompat
SECTION:=drivers
diff --git a/package/zd1211/Makefile b/package/zd1211/Makefile
index a71873b9f..1c79922cf 100644
--- a/package/zd1211/Makefile
+++ b/package/zd1211/Makefile
@@ -1,7 +1,7 @@
# $Id: Makefile 3297 2006-03-02 23:42:52Z florian $
include $(TOPDIR)/rules.mk
-include $(TOPDIR)/package/kernel.mk
+include $(TOPDIR)/include/kernel.mk
PKG_NAME:=zd1211
PKG_VERSION:=r69
@@ -13,7 +13,7 @@ PKG_SOURCE_URL:=http://zd1211.ath.cx/download/
PKG_SOURCE:=$(PKG_NAME)-driver-$(PKG_VERSION).tgz
PKG_CAT:=zcat
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
#FIXME: add proper dependency handling on kmod-usb-core packages
define Package/kmod-zd1211
diff --git a/package/zlib/Makefile b/package/zlib/Makefile
index 02659bb9a..8e497c2f2 100644
--- a/package/zlib/Makefile
+++ b/package/zlib/Makefile
@@ -14,7 +14,7 @@ PKG_CAT:=bzcat
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-include $(TOPDIR)/package/rules.mk
+include $(TOPDIR)/include/package.mk
define Package/zlib
SECTION:=base