Commit 5d39aa1d authored by Ryan Jackson's avatar Ryan Jackson

Lots of makefile changes

* Moved tarballs to a single directory
* More 64-bit related changes
parent cc2ee8bb
......@@ -12,8 +12,8 @@ BOOT_PATH = $(PWD)/boot
#FAKEROOT_BIN = $(STAGING_DIR)/usr/bin/fakeroot
FAKEROOT_BIN = fakeroot
#MODULES := busybox zlib linux dropbear testbed hdparm target_template sudo e2fsprogs openssl wget perl portmap file
MODULES := busybox zlib linux dropbear testbed hdparm target_template sudo e2fsprogs openssl wget portmap file
MODULES := busybox zlib linux dropbear testbed hdparm target_template sudo e2fsprogs openssl wget perl portmap file
#MODULES := busybox zlib linux dropbear testbed hdparm target_template sudo e2fsprogs openssl wget portmap file
INSTALL_MODULES := $(addsuffix -install,$(MODULES))
EXTRACT_MODULES := $(addsuffix -extract,$(MODULES))
PATCH_MODULES := $(addsuffix -patch,$(MODULES))
......
......@@ -28,11 +28,11 @@ menuconfig:
$(BUSYBOX_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xjf $(SOURCE_PATH)/busybox/busybox-$(BUSYBOX_VERSION).tar.bz2
cd $(TARGET_BUILD_PATH); tar xjf $(TARBALL_PATH)/busybox-$(BUSYBOX_VERSION).tar.bz2
touch $@
$(BUSYBOX_PATH)/.patch-stamp: $(BUSYBOX_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(BUSYBOX_PATH) $(SOURCE_PATH)/busybox/ '*.patch'
$(SCRIPTS_PATH)/patch-kernel.sh $(BUSYBOX_PATH) $(SOURCE_PATH)/busybox '*.patch'
touch $@
$(BUSYBOX_PATH)/.config-stamp: $(BUSYBOX_PATH)/.patch-stamp
......
......@@ -20,7 +20,7 @@ install: $(TARGET_PATH)/usr/sbin/dropbear
$(DROPBEAR_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/dropbear/dropbear-$(DROPBEAR_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/dropbear-$(DROPBEAR_VERSION).tar.gz
touch $@
$(DROPBEAR_PATH)/.patch-stamp: $(DROPBEAR_PATH)/.extract-stamp
......
......@@ -27,11 +27,11 @@ install: $(TARGET_PATH)/sbin/mke2fs $(TARGET_PATH)/sbin/tune2fs $(TARGET_PATH)/s
$(E2FSPROGS_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/e2fsprogs/e2fsprogs-$(E2FSPROGS_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/e2fsprogs-$(E2FSPROGS_VERSION).tar.gz
touch $@
$(E2FSPROGS_PATH)/.patch-stamp: $(E2FSPROGS_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(E2FSPROGS_PATH) $(SOURCE_PATH)/e2fsprogs/ '*.patch'
$(SCRIPTS_PATH)/patch-kernel.sh $(E2FSPROGS_PATH) $(SOURCE_PATH)/e2fsprogs '*.patch'
touch $@
#--build=$(GNU_HOST_NAME) \
......
......@@ -25,7 +25,7 @@ clean:
$(FILE_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/file/file-$(FILE_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/file-$(FILE_VERSION).tar.gz
touch $@
$(FILE_PATH)/.patch-stamp: $(FILE_PATH)/.extract-stamp
......
......@@ -24,11 +24,11 @@ clean:
$(HDPARM_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/hdparm/hdparm-$(HDPARM_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/hdparm-$(HDPARM_VERSION).tar.gz
touch $@
$(HDPARM_PATH)/.patch-stamp: $(HDPARM_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(HDPARM_PATH) $(SOURCE_PATH)/hdparm/ '*.patch'
$(SCRIPTS_PATH)/patch-kernel.sh $(HDPARM_PATH) $(SOURCE_PATH)/hdparm '*.patch'
touch $@
$(HDPARM_PATH)/.config-stamp: $(HDPARM_PATH)/.patch-stamp
......
......@@ -48,7 +48,7 @@ modules-install: modules
$(LINUX_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xjf $(SOURCE_PATH)/linux/linux-$(LINUX_VERSION).tar.bz2
cd $(TARGET_BUILD_PATH); tar xjf $(TARBALL_PATH)/linux-$(LINUX_VERSION).tar.bz2
touch $@
$(LINUX_PATH)/.patch-stamp: $(LINUX_PATH)/.extract-stamp
......
......@@ -28,7 +28,7 @@ OPENSSL_CFLAGS = -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=
$(OPENSSL_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/openssl/openssl-$(OPENSSL_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/openssl-$(OPENSSL_VERSION).tar.gz
touch $@
$(OPENSSL_PATH)/.patch-stamp: $(OPENSSL_PATH)/.extract-stamp
......
......@@ -24,12 +24,15 @@ patch: $(PERL_PATH)/.patch-stamp
config: $(PERL_PATH)/.config-stamp
perl: config
#LD_LIBRARY_PATH=$(STAGING_DIR)/lib:/lib \
$(PERL_PATH)/perl: config
PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
LD_LIBRARY_PATH=$(STAGING_DIR)/lib \
$(MAKE) -C $(PERL_PATH)
install:
perl: $(PERL_PATH)/perl
install: $(PERL_PATH)/perl
$(STRIPCMD) --strip-unneeded $(PERL_PATH)/perl
find $(PERL_PATH)/lib -name \*.so | xargs \
$(STRIPCMD) --strip-unneeded
......@@ -52,12 +55,13 @@ $(PERL_PATH)/.patch-stamp: $(PERL_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(PERL_PATH) $(SOURCE_PATH)/perl/ '*.patch'
touch $@
#LD_LIBRARY_PATH=/lib:$(STAGING_DIR)/lib; \
$(PERL_PATH)/.config-stamp: $(PERL_PATH)/.patch-stamp
cp $(SOURCE_PATH)/perl/config.sh $(PERL_PATH)
(export PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
LD_LIBRARY_PATH=$(STAGING_DIR)/lib; \
(export PATH=$(STAGING_DIR)/usr/bin:$(PATH); \
cd $(PERL_PATH); \
sh ./Configure -der && \
sh ./Configure -der -f config.sh && \
sh ./makedepend)
sed -i /command-line/d $(PERL_PATH)/makefile
sed -i /command-line/d $(PERL_PATH)/x2p/makefile
......
......@@ -39,11 +39,11 @@ clean:
$(PORTMAP_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/portmap/portmap-$(PORTMAP_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/portmap-$(PORTMAP_VERSION).tar.gz
touch $@
$(PORTMAP_PATH)/.patch-stamp: $(PORTMAP_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(PORTMAP_PATH) $(SOURCE_PATH)/portmap/ '*.patch'
$(SCRIPTS_PATH)/patch-kernel.sh $(PORTMAP_PATH) $(SOURCE_PATH)/portmap '*.patch'
touch $@
$(PORTMAP_PATH)/.config-stamp: $(PORTMAP_PATH)/.patch-stamp
......
......@@ -24,7 +24,7 @@ clean:
$(SUDO_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/sudo/sudo-$(SUDO_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/sudo-$(SUDO_VERSION).tar.gz
touch $@
$(SUDO_PATH)/.patch-stamp: $(SUDO_PATH)/.extract-stamp
......
......@@ -24,11 +24,11 @@ clean:
$(WGET_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/wget/wget-$(WGET_VERSION).tar.gz
cd $(TARGET_BUILD_PATH); tar xzf $(TARBALL_PATH)/wget-$(WGET_VERSION).tar.gz
touch $@
$(WGET_PATH)/.patch-stamp: $(WGET_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(WGET_PATH) $(SOURCE_PATH)/wget/ '*.patch'
$(SCRIPTS_PATH)/patch-kernel.sh $(WGET_PATH) $(SOURCE_PATH)/wget '*.patch'
touch $@
$(WGET_PATH)/.config-stamp: $(WGET_PATH)/.patch-stamp
......
......@@ -33,11 +33,11 @@ ZLIB_CFLAGS = -fPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BI
$(ZLIB_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xjf $(SOURCE_PATH)/zlib/zlib-$(ZLIB_VERSION).tar.bz2
cd $(TARGET_BUILD_PATH); tar xjf $(TARBALL_PATH)/zlib-$(ZLIB_VERSION).tar.bz2
touch $@
$(ZLIB_PATH)/.patch-stamp: $(ZLIB_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(ZLIB_PATH) $(SOURCE_PATH)/zlib/ '*.patch'
$(SCRIPTS_PATH)/patch-kernel.sh $(ZLIB_PATH) $(SOURCE_PATH)/zlib '*.patch'
touch $@
$(ZLIB_PATH)/.config-stamp: $(ZLIB_PATH)/.patch-stamp
......
......@@ -2,6 +2,7 @@ TOPDIR = $(PWD)
SOURCE_PATH = $(TOPDIR)/source
SCRIPTS_PATH = $(TOPDIR)/scripts
TOOLCHAIN_BUILD_PATH = $(TOPDIR)/toolchain_build
TARBALL_PATH = $(TOPDIR)/tarballs
TARGET_BUILD_PATH = $(TOPDIR)/build
TARGET_PATH = $(TOPDIR)/target
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment