summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-08 09:08:38 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-08 09:08:38 +0000
commite8d897309949d4c2cc7a77ba0e6ca84f071fa6e9 (patch)
tree66a9a28ea0c69b059939becc0f335bc8ec1d5437
parent75821f0878d074fff9467e4c74d2ed718a35002f (diff)
add some fixes for parallel build (does not work with -j4 yet, but it gets most packages compiled now)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@577 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--openwrt/Makefile2
-rw-r--r--openwrt/package/Makefile4
-rw-r--r--openwrt/package/fping/Makefile6
-rw-r--r--openwrt/package/iproute2/Makefile6
-rw-r--r--openwrt/package/libelf/Makefile6
-rw-r--r--openwrt/package/linux/Makefile1
-rw-r--r--openwrt/package/ncurses/Makefile4
-rw-r--r--openwrt/package/openssl/Makefile8
-rw-r--r--openwrt/package/openwrt/libnvram/Makefile4
-rw-r--r--openwrt/package/tcp_wrappers/Makefile4
-rw-r--r--openwrt/rules.mk2
-rw-r--r--openwrt/target/Makefile1
12 files changed, 32 insertions, 16 deletions
diff --git a/openwrt/Makefile b/openwrt/Makefile
index fd2a4ad8e4..e966188187 100644
--- a/openwrt/Makefile
+++ b/openwrt/Makefile
@@ -45,6 +45,8 @@ include $(TOPDIR)/rules.mk
all: world
+.NOTPARALLEL:
+
##############################################################
#
# Build the toolchain
diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile
index 99696770c1..2db33703b2 100644
--- a/openwrt/package/Makefile
+++ b/openwrt/package/Makefile
@@ -1,6 +1,7 @@
# Main makefile for the packages
include $(TOPDIR)/rules.mk
+package-:=tcp_wrappers
package-y:=openwrt
package-$(BR2_PACKAGE_AICCU) += aiccu
package-$(BR2_PACKAGE_ARPTABLES) += arptables
@@ -52,6 +53,7 @@ package-$(BR2_PACKAGE_ZLIB) += zlib
package-$(BR2_PACKAGE_DHCPFWD) += dhcp-forwarder
package-$(BR2_PACKAGE_LIBNET) += libnet
package-$(BR2_PACKAGE_LIBMYSQLCLIENT) += mysql
+package-$(BR2_PACKAGE_LIBPCAP) += libpcap
package-$(BR2_PACKAGE_LIBPQ) += postgresql
all: compile install
@@ -77,7 +79,7 @@ libnet-compile: libpcap-compile
mysql-compile: ncurses-compile zlib-compile
postgresql-compile: zlib-compile
-$(patsubst %,%-prepare,$(package-y) $(package-m)): linux-install
+$(patsubst %,%-prepare,$(package-y) $(package-m) $(package-)): linux-install
%-prepare:
@[ -f $(STAMP_DIR)/.$@ ] || $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
diff --git a/openwrt/package/fping/Makefile b/openwrt/package/fping/Makefile
index 20a8ade91b..123ebe68a2 100644
--- a/openwrt/package/fping/Makefile
+++ b/openwrt/package/fping/Makefile
@@ -14,6 +14,8 @@ PKG_CAT:=zcat
PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
+.NOTPARALLEL:
+
$(DL_DIR)/$(PKG_SOURCE):
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
@@ -46,11 +48,11 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/$(PKG_NAME)4: $(PKG_BUILD_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
+ $(MAKE) -j1 CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)4
$(PKG_BUILD_DIR)/$(PKG_NAME)6: $(PKG_BUILD_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -DIPV6=1" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
+ $(MAKE) -j1 CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -DIPV6=1" -C $(PKG_BUILD_DIR) clean $(PKG_NAME)
mv $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME)6
$(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)4 $(PKG_BUILD_DIR)/$(PKG_NAME)6
diff --git a/openwrt/package/iproute2/Makefile b/openwrt/package/iproute2/Makefile
index e442129062..5c6b96eb0f 100644
--- a/openwrt/package/iproute2/Makefile
+++ b/openwrt/package/iproute2/Makefile
@@ -18,6 +18,8 @@ PKG_IP_DIR:=$(PKG_BUILD_DIR)/ipkg/ip
PKG_TC:=$(PACKAGE_DIR)/tc_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_TC_DIR:=$(PKG_BUILD_DIR)/ipkg/tc
+.NOTPARALLEL:
+
$(DL_DIR)/$(PKG_SOURCE):
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
@@ -39,10 +41,10 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/tc/tc: $(PKG_BUILD_DIR)/.configured
- $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc
+ $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc
$(PKG_BUILD_DIR)/ip/ip: $(PKG_BUILD_DIR)/.configured
- $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all ip/ip
+ $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all ip/ip
$(PKG_IP): $(PKG_BUILD_DIR)/ip/ip $(PACKAGE_DIR)
diff --git a/openwrt/package/libelf/Makefile b/openwrt/package/libelf/Makefile
index 8971e86069..0cfb23c523 100644
--- a/openwrt/package/libelf/Makefile
+++ b/openwrt/package/libelf/Makefile
@@ -15,6 +15,8 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_IPK_DIR :=$(PKG_BUILD_DIR)/ipkg/
+.NOTPARALLEL:
+
$(DL_DIR)/$(PKG_SOURCE_FILE):
mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
@@ -38,11 +40,11 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER): $(PKG_BUILD_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
+ $(MAKE) -j1 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
-C $(PKG_BUILD_DIR)
$(STAGING_DIR)/lib/libelf.so: $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER)
- $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
+ $(MAKE) -j1 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
-C $(PKG_BUILD_DIR)/lib instroot="$(STAGING_DIR)" install
diff --git a/openwrt/package/linux/Makefile b/openwrt/package/linux/Makefile
index 29a1bfa309..3f730355b9 100644
--- a/openwrt/package/linux/Makefile
+++ b/openwrt/package/linux/Makefile
@@ -10,6 +10,7 @@ PKG_RELEASE := 1
TARGETS :=
INSTALL_TARGETS :=
+.NOTPARALLEL:
define KMOD_template
ifeq ($$(strip $(4)),)
diff --git a/openwrt/package/ncurses/Makefile b/openwrt/package/ncurses/Makefile
index 3835af6c1a..3d73e7747f 100644
--- a/openwrt/package/ncurses/Makefile
+++ b/openwrt/package/ncurses/Makefile
@@ -20,6 +20,8 @@ PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
PKG_IPK := $(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+.NOTPARALLEL:
+
$(DL_DIR)/$(PKG_SOURCE_FILE):
mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
@@ -35,7 +37,7 @@ $(PKG_IPK): $(PKG_BUILD_DIR)/ipkg/rules
cd $(PKG_BUILD_DIR); \
TOPDIR="$(TOPDIR)" IPKG_RULES_INC="$(TOPDIR)/rules.mk" \
INSTALL_DIR="$(STAGING_DIR)" \
- ./ipkg/rules package
+ $(MAKE) -j1 -f ./ipkg/rules package
$(IPKG_STATE_DIR)/info/lib$(PKG_NAME).list: $(PKG_IPK)
$(IPKG) install $(PKG_IPK)
diff --git a/openwrt/package/openssl/Makefile b/openwrt/package/openssl/Makefile
index e72f8f68cc..afa5f304e4 100644
--- a/openwrt/package/openssl/Makefile
+++ b/openwrt/package/openssl/Makefile
@@ -16,6 +16,8 @@ PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
OPENSSL_NO_CIPHERS:=no-idea no-mdc2 no-rc5 no-rc2 no-md2 no-md4
+.NOTPARALLEL:
+
$(DL_DIR)/$(PKG_SOURCE_FILE):
mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
@@ -38,13 +40,13 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/apps/openssl: $(PKG_BUILD_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(PKG_BUILD_DIR) all build-shared
+ $(MAKE) -j1 CC=$(TARGET_CC) -C $(PKG_BUILD_DIR) all build-shared
# Work around openssl build bug to link libssl.so with libcrypto.so.
-rm $(PKG_BUILD_DIR)/libssl.so.*.*.*
- $(MAKE) CC=$(TARGET_CC) -C $(PKG_BUILD_DIR) do_linux-shared
+ $(MAKE) -j1 CC=$(TARGET_CC) -C $(PKG_BUILD_DIR) do_linux-shared
$(STAGING_DIR)/lib/libssl.so: $(PKG_BUILD_DIR)/apps/openssl
- $(MAKE) CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(PKG_BUILD_DIR) install_sw
+ $(MAKE) -j1 CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(PKG_BUILD_DIR) install_sw
cp -fa $(PKG_BUILD_DIR)/libcrypto.so* $(STAGING_DIR)/lib/
chmod a-x $(STAGING_DIR)/lib/libcrypto.so.0.9.7
(cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so)
diff --git a/openwrt/package/openwrt/libnvram/Makefile b/openwrt/package/openwrt/libnvram/Makefile
index 8bb4c5c35e..75a1afcd6a 100644
--- a/openwrt/package/openwrt/libnvram/Makefile
+++ b/openwrt/package/openwrt/libnvram/Makefile
@@ -21,8 +21,8 @@ $(foreach obj,$(OBJS),$(eval $(call OBJ_template,$(obj))))
$(PKG_BUILD_DIR):
mkdir -p $(PKG_BUILD_DIR)
-$(PKG_BUILD_DIR)/nvram: $(PKG_BUILD_DIR)/main.o
- $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $^ -L$(PKG_BUILD_DIR) -lnvram
+$(PKG_BUILD_DIR)/nvram: $(PKG_BUILD_DIR)/main.o $(PKG_BUILD_DIR)/libnvram.so
+ $(TARGET_CC) $(TARGET_CFLAGS) -o $@ $< -L$(PKG_BUILD_DIR) -lnvram
$(PKG_BUILD_DIR)/libnvram.so: $(LIBNVRAM_OBJS)
$(TARGET_CC) -shared -o $@ $^
diff --git a/openwrt/package/tcp_wrappers/Makefile b/openwrt/package/tcp_wrappers/Makefile
index 84f98160d5..40e7331af1 100644
--- a/openwrt/package/tcp_wrappers/Makefile
+++ b/openwrt/package/tcp_wrappers/Makefile
@@ -16,6 +16,7 @@ PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
# only need libwrap.a at the moment
#PKG_IPK := $(PACKAGE_DIR)/zlib_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+.NOTPARALLEL:
$(DL_DIR)/$(PKG_SOURCE_FILE):
mkdir -p $(DL_DIR)
@@ -28,8 +29,7 @@ $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
touch $(PKG_BUILD_DIR)/.patched
$(PKG_BUILD_DIR)/libwrap.a: $(PKG_BUILD_DIR)/.patched
-
- $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(MAKE) -j1 -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
COPTS="$(TARGET_CFLAGS)" \
LIBS=-lnsl \
diff --git a/openwrt/rules.mk b/openwrt/rules.mk
index d403260ddb..b8ed526a0c 100644
--- a/openwrt/rules.mk
+++ b/openwrt/rules.mk
@@ -1,6 +1,6 @@
include $(TOPDIR)/.config
MAKE1=make
-MAKE=make -j$(BR2_JLEVEL)
+MAKEFLAGS=-j$(BR2_JLEVEL)
# Strip off the annoying quoting
ARCH:=$(strip $(subst ",, $(BR2_ARCH)))
diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile
index 6a1bd954a0..437609a28b 100644
--- a/openwrt/target/Makefile
+++ b/openwrt/target/Makefile
@@ -73,6 +73,7 @@ $(BIN_DIR):
mkdir -p $(BIN_DIR)
$(INSTALL_TARGET_DIRS): lzma-loader-compile
+$(IMAGE_TARGETS): $(patsubst %,%-install,$(TARGET_DIRS))
compile: $(patsubst %,%-compile,$(TARGET_DIRS))
install: utils-install lzma-install $(LINUX_IMAGE) $(patsubst %,%-install,$(TARGET_DIRS)) $(IMAGE_TARGETS)
clean: $(patsubst %,%-clean,$(TARGET_DIRS)) image_clean