cleanup; replace .PHONY with FORCE; disable gdb by default

SVN-Revision: 3877
This commit is contained in:
Felix Fietkau 2006-05-31 23:29:05 +00:00
parent 00b53c7433
commit 9ba9373d54
29 changed files with 81 additions and 92 deletions

View file

@ -13,20 +13,20 @@ compile: linux-compile
install: image_clean linux-install install: image_clean linux-install
clean: linux-clean utils-clean lzma-clean image_clean clean: linux-clean utils-clean lzma-clean image_clean
image_clean: image_clean: FORCE
rm -f $(BIN_DIR)/openwrt-* rm -f $(BIN_DIR)/openwrt-*
%-clean: %-clean: FORCE
$(MAKE) -C $(patsubst %-clean,%,$@) clean $(MAKE) -C $(patsubst %-clean,%,$@) clean
%-prepare: %-prepare: FORCE
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
%-compile: %-prepare %-compile: %-prepare
$(MAKE) -C $(patsubst %-compile,%,$@) compile $(MAKE) -C $(patsubst %-compile,%,$@) compile
%-rebuild: %-rebuild: FORCE
$(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
%-install: %-compile %-install: %-compile
$(MAKE) -C $(patsubst %-install,%,$@) install $(MAKE) -C $(patsubst %-install,%,$@) install
linux-imagebuilder: linux-imagebuilder: FORCE
$(MAKE) -C linux imagebuilder $(MAKE) -C linux imagebuilder

View file

@ -60,7 +60,7 @@ $(LINUX_DIR)/.drivers-unpacked: $(LINUX_DIR)/.unpacked
linux-dirclean: drivers-clean linux-dirclean: drivers-clean
drivers-clean: drivers-clean: FORCE
rm -rf $(BUILD_DIR)/$(ATM_FIRMWARE_DIR) rm -rf $(BUILD_DIR)/$(ATM_FIRMWARE_DIR)

View file

@ -62,5 +62,5 @@ $(LINUX_DIR)/.drivers-installed: $(LINUX_DIR)/.modules_done
linux-dirclean: drivers-clean linux-dirclean: drivers-clean
drivers-clean: drivers-clean: FORCE
rm -rf $(BUILD_DIR)/kernel-binary-wl rm -rf $(BUILD_DIR)/kernel-binary-wl

View file

@ -14,25 +14,23 @@ ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
include ./tgz.mk include ./tgz.mk
endif endif
prepare: prepare: FORCE
$(MAKE) prepare-targets $(MAKE) prepare-targets
compile: compile: FORCE
$(MAKE) compile-targets $(MAKE) compile-targets
install: install: FORCE
$(MAKE) install-targets $(MAKE) install-targets
.PHONY: prepare compile install $(BOARD)-compile: FORCE
$(BOARD)-compile:
$(MAKE) -C $(BOARD) prepare $(MAKE) -C $(BOARD) prepare
$(MAKE) -C $(BOARD) compile $(MAKE) -C $(BOARD) compile
install-ib: install-ib: FORCE
-$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib -$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib
mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
$(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ $(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
install-prepare: install-prepare: FORCE
find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644 find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644
find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755 find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755
find $(BUILD_DIR)/root -type d | xargs chmod 0755 find $(BUILD_DIR)/root -type d | xargs chmod 0755
@ -40,5 +38,5 @@ install-prepare:
chmod 0777 $(BUILD_DIR)/root/tmp chmod 0777 $(BUILD_DIR)/root/tmp
rebuild: clean prepare compile install rebuild: clean prepare compile install
clean: clean: FORCE
$(MAKE) clean-targets $(MAKE) clean-targets

View file

@ -12,10 +12,10 @@ LOADER_MAKEOPTS= \
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
lzma-loader-clean: lzma-loader-clean: FORCE
$(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean
lzma-loader-prepare: lzma-loader-prepare: FORCE
$(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare
lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare

View file

@ -12,10 +12,10 @@ LOADER_MAKEOPTS= \
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
lzma-loader-clean: lzma-loader-clean: FORCE
$(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean
lzma-loader-prepare: lzma-loader-prepare: FORCE
$(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare $(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) prepare
lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare lzma-loader-compile: $(KDIR)/vmlinux.lzma lzma-loader-prepare

View file

@ -2,10 +2,10 @@ include $(TOPDIR)/rules.mk
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
lzma-loader-clean: lzma-loader-clean: FORCE
$(MAKE) -C lzma-loader clean $(MAKE) -C lzma-loader clean
lzma-loader-prepare: lzma-loader-prepare: FORCE
$(MAKE) -C lzma-loader prepare $(MAKE) -C lzma-loader prepare
lzma-loader-compile: lzma-loader-prepare lzma-loader-compile: lzma-loader-prepare

View file

@ -6,13 +6,13 @@ endif
#JFFS2OPTS += -Xlzo -msize -Xlzari #JFFS2OPTS += -Xlzo -msize -Xlzari
jffs2-prepare: jffs2-prepare: FORCE
$(MAKE) -C jffs2 prepare $(MAKE) -C jffs2 prepare
jffs2-compile: prepare-targets jffs2-compile: prepare-targets
$(MAKE) -C jffs2 compile $(MAKE) -C jffs2 compile
jffs2-clean: jffs2-clean: FORCE
$(MAKE) -C jffs2 clean $(MAKE) -C jffs2 clean
rm -f $(KDIR)/root.jffs2* rm -f $(KDIR)/root.jffs2*
@ -28,11 +28,11 @@ ifeq ($(IB),)
jffs2-install: compile-targets $(BOARD)-compile jffs2-install: compile-targets $(BOARD)-compile
endif endif
jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB jffs2-install: $(KDIR)/root.jffs2-4MB $(KDIR)/root.jffs2-8MB FORCE
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-4MB" $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-4MB"
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-8MB" $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="jffs2-8MB"
jffs2-install-ib: compile-targets jffs2-install-ib: compile-targets FORCE
mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin mkdir -p $(IB_DIR)/staging_dir_$(ARCH)/bin
$(CP) $(STAGING_DIR)/bin/mkfs.jffs2 $(IB_DIR)/staging_dir_$(ARCH)/bin $(CP) $(STAGING_DIR)/bin/mkfs.jffs2 $(IB_DIR)/staging_dir_$(ARCH)/bin

View file

@ -24,6 +24,6 @@ source: $(DL_DIR)/$(MTD_SOURCE)
prepare: $(MTD_DIR)/.unpacked prepare: $(MTD_DIR)/.unpacked
compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2 compile: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2
install: install:
clean: clean: FORCE
rm -rf $(MTD_DIR) rm -rf $(MTD_DIR)

View file

@ -4,13 +4,13 @@ else
endian := be endian := be
endif endif
squashfs-prepare: squashfs-prepare: FORCE
$(MAKE) -C squashfs prepare $(MAKE) -C squashfs prepare
squashfs-compile: prepare-targets squashfs-compile: prepare-targets
$(MAKE) -C squashfs compile $(MAKE) -C squashfs compile
squashfs-clean: squashfs-clean: FORCE
$(MAKE) -C squashfs clean $(MAKE) -C squashfs clean
rm -f $(KDIR)/root.squashfs rm -f $(KDIR)/root.squashfs
@ -22,7 +22,7 @@ ifeq ($(IB),)
squashfs-install: compile-targets $(BOARD)-compile squashfs-install: compile-targets $(BOARD)-compile
endif endif
squashfs-install: $(KDIR)/root.squashfs squashfs-install: $(KDIR)/root.squashfs FORCE
$(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs" $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs"
squashfs-install-ib: compile-targets squashfs-install-ib: compile-targets

View file

@ -23,5 +23,5 @@ source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE)
prepare: $(SQUASHFSLZMA_DIR)/.unpacked prepare: $(SQUASHFSLZMA_DIR)/.unpacked
compile: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma compile: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma
install: install:
clean: clean: FORCE
rm -rf $(SQUASHFSLZMA_DIR) rm -rf $(SQUASHFSLZMA_DIR)

View file

@ -1,4 +1,4 @@
$(KDIR)/root.tar.gz: $(KDIR)/root.tar.gz: FORCE
tar -zcf $@ --owner=root --group=root -C $(BUILD_DIR)/root/ . tar -zcf $@ --owner=root --group=root -C $(BUILD_DIR)/root/ .
ifeq ($(BOARD),x86) ifeq ($(BOARD),x86)

View file

@ -4,33 +4,28 @@ KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
ifeq ($(FS),jffs2-8MB) ifeq ($(FS),jffs2-8MB)
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS)
$(CP) $^ $@ $(CP) $^ $@
install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
endif endif
ifeq ($(FS),tgz) ifeq ($(FS),tgz)
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz
$(CP) $^ $@ $(CP) $^ $@
install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz
endif endif
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/bzImage
$(CP) $^ $@ $(CP) $^ $@
clean: clean:
prepare: prepare:
compile: compile:
install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
install-ib: install-ib: FORCE
mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
$(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/

View file

@ -2,35 +2,29 @@ include $(TOPDIR)/rules.mk
KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
ifeq ($(FS),jffs2-8MB) ifeq ($(FS),jffs2-8MB)
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS) $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img: $(KDIR)/root.$(FS)
$(CP) $^ $@ $(CP) $^ $@
install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-$(FS).img
endif endif
ifeq ($(FS),tgz) ifeq ($(FS),tgz)
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz: $(KDIR)/root.tar.gz
$(CP) $^ $@ $(CP) $^ $@
install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-rootfs.tar.gz
endif endif
$(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/vmlinux $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz: $(KDIR)/vmlinux
$(CP) $^ $@ $(CP) $^ $@
clean: clean:
prepare: prepare:
compile: compile:
install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz install: $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
install-ib: install-ib: FORCE
mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
$(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/ $(CP) $(KDIR)/bzImage $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/

View file

@ -21,12 +21,12 @@ endef
include ./kernel.mk include ./kernel.mk
clean: clean: FORCE
@rm -rf $(LINUX_BUILD_DIR)/root* @rm -rf $(LINUX_BUILD_DIR)/root*
@rm -rf $(BIN_DIR) @rm -rf $(BIN_DIR)
all: all:
build: build: FORCE
echo echo
echo '### BUILDING IMAGE FROM lists/$(LIST).$(BOARD)-$(KERNEL)' echo '### BUILDING IMAGE FROM lists/$(LIST).$(BOARD)-$(KERNEL)'
echo echo

View file

@ -72,7 +72,7 @@ $(BUILD_DIR)/kernel.mk: FORCE
echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@
echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@
pkg-install: pkg-install: FORCE
@{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; } @{ [ "$(INSTALL_TARGETS)" != "" ] && $(IPKG) install $(INSTALL_TARGETS) || true; }
source: $(DL_DIR)/$(LINUX_SOURCE) source: $(DL_DIR)/$(LINUX_SOURCE)
@ -84,24 +84,21 @@ compile: prepare $(STAMP_DIR)/.linux-compile
install: compile $(LINUX_KERNEL) install: compile $(LINUX_KERNEL)
mostlyclean: mostlyclean: FORCE
rm -f $(STAMP_DIR)/.linux-compile rm -f $(STAMP_DIR)/.linux-compile
rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.modules_done
rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked rm -f $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)/.drivers-unpacked
$(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean $(MAKE) -C $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION) clean
rm -f $(LINUX_KERNEL) rm -f $(LINUX_KERNEL)
rebuild: rebuild: FORCE
-$(MAKE) mostlyclean -$(MAKE) mostlyclean
if [ -f $(LINUX_KERNEL) ]; then \ if [ -f $(LINUX_KERNEL) ]; then \
$(MAKE) clean; \ $(MAKE) clean; \
fi fi
$(MAKE) compile $(MAKE_TRACE) $(MAKE) compile $(MAKE_TRACE)
clean: clean: FORCE
rm -f $(STAMP_DIR)/.linux-compile rm -f $(STAMP_DIR)/.linux-compile
rm -rf $(LINUX_BUILD_DIR) rm -rf $(LINUX_BUILD_DIR)
rm -f $(TARGETS) rm -f $(TARGETS)
.PHONY: source prepare compile install mostlyclean rebuild clean pkg-install

View file

@ -26,22 +26,22 @@ install: $(patsubst %,%-install,$(package-y))
KPKG_MAKEOPTS += BUILD_DIR="$(LINUX_BUILD_DIR)" KPKG_MAKEOPTS += BUILD_DIR="$(LINUX_BUILD_DIR)"
%-prepare: %-prepare: FORCE
$(MAKE) -C $(patsubst %-prepare,%,$@) \ $(MAKE) -C $(patsubst %-prepare,%,$@) \
$(KPKG_MAKEOPTS) \ $(KPKG_MAKEOPTS) \
prepare prepare
%-compile: %-compile: FORCE
$(MAKE) -C $(patsubst %-compile,%,$@) \ $(MAKE) -C $(patsubst %-compile,%,$@) \
$(KPKG_MAKEOPTS) \ $(KPKG_MAKEOPTS) \
compile compile
%-install: %-install: FORCE
$(MAKE) -C $(patsubst %-install,%,$@) \ $(MAKE) -C $(patsubst %-install,%,$@) \
$(KPKG_MAKEOPTS) \ $(KPKG_MAKEOPTS) \
install install
%-clean: %-clean: FORCE
@$(MAKE) -C $(patsubst %-clean,%,$@) \ @$(MAKE) -C $(patsubst %-clean,%,$@) \
$(KPKG_MAKEOPTS) \ $(KPKG_MAKEOPTS) \
clean clean

View file

@ -36,18 +36,18 @@ lzma: $(TARGETS)
lzma-source: $(DL_DIR)/$(LZMA_SOURCE) lzma-source: $(DL_DIR)/$(LZMA_SOURCE)
lzma-clean: lzma-clean: FORCE
-$(MAKE) -C $(LZMA_LIB_DIR) clean -$(MAKE) -C $(LZMA_LIB_DIR) clean
-$(MAKE) -C $(LZMA_ALONE_DIR) clean -$(MAKE) -C $(LZMA_ALONE_DIR) clean
rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma rm -f $(LZMA_DIR)/liblzma.a $(LZMA_DIR)/lzma
lzma-dirclean: lzma-dirclean: FORCE
rm -rf $(LZMA_DIR) rm -rf $(LZMA_DIR)
############################################################# #############################################################
prepare: $(LZMA_DIR)/.unpacked prepare: $(LZMA_DIR)/.unpacked
compile: lzma compile: lzma
install: lzma install: lzma FORCE
$(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/ $(CP) $(LZMA_DIR)/lzma $(STAGING_DIR)/bin/
clean: lzma-dirclean clean: lzma-dirclean

View file

@ -5,12 +5,12 @@ TARGETS := addpattern trx motorola-bin dgfirmware
UTILS_BUILD_DIR:=$(BUILD_DIR)/target-utils UTILS_BUILD_DIR:=$(BUILD_DIR)/target-utils
prepare: $(UTILS_BUILD_DIR) prepare: $(UTILS_BUILD_DIR)
compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS)) FORCE
mkdir -p $(STAGING_DIR)/bin mkdir -p $(STAGING_DIR)/bin
$(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/
install: compile install: compile
package: package:
clean: clean: FORCE
rm -rf $(UTILS_BUILD_DIR) rm -rf $(UTILS_BUILD_DIR)
for f in $(TARGETS); do \ for f in $(TARGETS); do \
rm -f $(STAGING_DIR)/bin/$$f ; \ rm -f $(STAGING_DIR)/bin/$$f ; \

View file

@ -6,6 +6,13 @@ menuconfig TOOLCHAINOPTS
source "toolchain/binutils/Config.in" source "toolchain/binutils/Config.in"
source "toolchain/gcc/Config.in" source "toolchain/gcc/Config.in"
config GDB
bool
prompt "Build gdb" if TOOLCHAINOPTS
default n
help
Enable if you want to build the gdb
config ENABLE_MULTILIB config ENABLE_MULTILIB
bool bool
prompt "Enable multilib support?" if TOOLCHAINOPTS prompt "Enable multilib support?" if TOOLCHAINOPTS

View file

@ -1,9 +1,10 @@
# Main makefile for the toolchain # Main makefile for the toolchain
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
TARGETS:=sed utils binutils gcc uClibc ipkg-utils gdb libnotimpl TARGETS-y:=sed utils binutils gcc uClibc ipkg-utils libnotimpl
TARGETS-$(CONFIG_GDB) += gdb
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS)) TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
all: install all: install
install: $(TARGETS_INSTALL) install: $(TARGETS_INSTALL)
@ -18,18 +19,18 @@ gcc-compile: uClibc-install
TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles
$(TOOLCHAIN_STAMP_DIR): $(TOOLCHAIN_STAMP_DIR):
mkdir -p $(TOOLCHAIN_STAMP_DIR) mkdir -p $@
$(STAGING_DIR): $(STAGING_DIR):
@mkdir -p $(STAGING_DIR)/lib @mkdir -p $@/lib
@mkdir -p $(STAGING_DIR)/include @mkdir -p $@/include
@mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) @mkdir -p $@/$(REAL_GNU_TARGET_NAME)
@ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib @ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib
$(TOOL_BUILD_DIR): $(TOOL_BUILD_DIR):
@mkdir -p $(TOOL_BUILD_DIR) @mkdir -p $@
%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) %-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \ @[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
} }
@ -47,7 +48,7 @@ $(TOOL_BUILD_DIR):
} }
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ @touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
%-clean: %-clean: FORCE
@$(MAKE) -C $(patsubst %-clean,%,$@) clean @$(MAKE) -C $(patsubst %-clean,%,$@) clean
@rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-* @rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-*

View file

@ -5,8 +5,7 @@ include $(TOPDIR)/rules.mk
# build binutils for use on the host system # build binutils for use on the host system
# #
############################################################# #############################################################
BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION))) BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#"))
#"
BINUTILS_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \ BINUTILS_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \
http://www.fi.kernel.org/pub/linux/devel/binutils \ http://www.fi.kernel.org/pub/linux/devel/binutils \
@ -99,7 +98,7 @@ source: $(DL_DIR)/$(BINUTILS_SOURCE)
prepare: $(BINUTILS_DIR)/.patched prepare: $(BINUTILS_DIR)/.patched
compile: $(BINUTILS_DIR1)/binutils/objdump compile: $(BINUTILS_DIR1)/binutils/objdump
install: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-ld install: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-ld
clean: clean: FORCE
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
rm -rf $(BINUTILS_DIR) $(BINUTILS_DIR1) rm -rf $(BINUTILS_DIR) $(BINUTILS_DIR1)

View file

@ -145,7 +145,7 @@ $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) all PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) all
touch $(GCC_BUILD_DIR2)/.compiled touch $(GCC_BUILD_DIR2)/.compiled
gcc-install: $(GCC_BUILD_DIR2)/.compiled gcc-install: $(GCC_BUILD_DIR2)/.compiled FORCE
PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install
echo $(GCC_VERSION) > $(STAGING_DIR)/gcc_version echo $(GCC_VERSION) > $(STAGING_DIR)/gcc_version
# Set up the symlinks to enable lying about target name. # Set up the symlinks to enable lying about target name.

View file

@ -55,5 +55,5 @@ source: $(DL_DIR)/$(GDB_SOURCE)
prepare: $(GDB_DIR)/.patched prepare: $(GDB_DIR)/.patched
compile: compile:
install: $(TARGET_CROSS)gdb install: $(TARGET_CROSS)gdb
clean: clean: FORCE
rm -rf $(GDB_CLIENT_DIR) $(GDB_DIR) rm -rf $(GDB_CLIENT_DIR) $(GDB_DIR)

View file

@ -40,14 +40,11 @@ $(STAGING_DIR)/usr/bin/ipkg-build: $(PKG_BUILD_DIR)/.patched
install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin
source: $(DL_DIR)/$(PKG_SOURCE_FILE) source: $(DL_DIR)/$(PKG_SOURCE_FILE)
prepare: $(PKG_BUILD_DIR)/.patched prepare: $(PKG_BUILD_DIR)/.patched
compile: compile:
install: $(STAGING_DIR)/usr/bin/ipkg-build install: $(STAGING_DIR)/usr/bin/ipkg-build
clean: clean: FORCE
rm -f $(STAGING_DIR)/etc/ipkg.conf rm -f $(STAGING_DIR)/etc/ipkg.conf
rm -f $(STAGING_DIR)/usr/bin/ipkg* rm -f $(STAGING_DIR)/usr/bin/ipkg*
rm -rf $(PKG_BUILD_DIR) rm -rf $(PKG_BUILD_DIR)

View file

@ -24,7 +24,7 @@ source:
prepare: $(LIBNOTIMPL_DIR)/.prepared prepare: $(LIBNOTIMPL_DIR)/.prepared
compile: $(LIBNOTIMPL_DIR)/libnotimpl.a compile: $(LIBNOTIMPL_DIR)/libnotimpl.a
install: $(STAGING_DIR)/usr/lib/libnotimpl.a install: $(STAGING_DIR)/usr/lib/libnotimpl.a
clean: clean: FORCE
rm -rf \ rm -rf \
$(STAGING_DIR)/usr/lib/libnotimpl.a \ $(STAGING_DIR)/usr/lib/libnotimpl.a \
$(LIBNOTIMPL_DIR) \ $(LIBNOTIMPL_DIR) \

View file

@ -46,7 +46,7 @@ $(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured
$(MAKE) -C $(SED_DIR1) $(MAKE) -C $(SED_DIR1)
# This stuff is needed to work around GNU make deficiencies # This stuff is needed to work around GNU make deficiencies
build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) FORCE
@if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \ @if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi; rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi;
@if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \ @if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \
@ -58,7 +58,7 @@ build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \ rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
$(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi $(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi
use-sed-host-binary: use-sed-host-binary: FORCE
@if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \ @if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \
if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \ if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \
mkdir -p $(STAGING_DIR)/bin; \ mkdir -p $(STAGING_DIR)/bin; \
@ -69,7 +69,7 @@ source:
prepare: prepare:
compile: compile:
install: $(HOST_SED_TARGET) install: $(HOST_SED_TARGET)
clean: clean: FORCE
rm -rf $(SED_DIR1) rm -rf $(SED_DIR1)
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY) rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY)

View file

@ -9,15 +9,16 @@ include $(TOPDIR)/rules.mk
ifeq ($(CONFIG_UCLIBC_VERSION_SNAPSHOT),y) ifeq ($(CONFIG_UCLIBC_VERSION_SNAPSHOT),y)
# Be aware that this changes daily.... # Be aware that this changes daily....
UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc
UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2 UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2#"))
#"
UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots
UCLIBC_VER:=PKG_VERSION:=0.${shell date +"%G%m%d"} UCLIBC_VER:=PKG_VERSION:=0.${shell date +"%G%m%d"}
UCLIBC_MD5SUM:=x
else else
UCLIBC_VER:=0.9.28 UCLIBC_VER:=0.9.28
UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER) UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER)
UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER).tar.bz2 UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER).tar.bz2
UCLIBC_SITE:=http://www.uclibc.org/downloads UCLIBC_SITE:=http://www.uclibc.org/downloads
UCLIBC_MD5SUM:=1ada58d919a82561061e4741fb6abd29
endif endif
UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
@ -37,7 +38,7 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
$(DL_DIR)/$(UCLIBC_SOURCE): $(DL_DIR)/$(UCLIBC_SOURCE):
mkdir -p $(DL_DIR) mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) x $(UCLIBC_SITE) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) $(UCLIBC_MD5SUM) $(UCLIBC_SITE)
$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE) $(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
mkdir -p $(TOOL_BUILD_DIR) mkdir -p $(TOOL_BUILD_DIR)
@ -99,5 +100,5 @@ source: $(DL_DIR)/$(UCLIBC_SOURCE)
prepare: $(UCLIBC_DIR)/.configured prepare: $(UCLIBC_DIR)/.configured
compile: $(UCLIBC_DIR)/lib/libc.a compile: $(UCLIBC_DIR)/lib/libc.a
install: $(STAGING_DIR)/lib/libc.a $(UCLIBC_TARGETS) install: $(STAGING_DIR)/lib/libc.a $(UCLIBC_TARGETS)
clean: clean: FORCE
rm -rf $(UCLIBC_DIR) $(TOOL_BUILD_DIR)/uClibc_dev rm -rf $(UCLIBC_DIR) $(TOOL_BUILD_DIR)/uClibc_dev

View file

@ -14,7 +14,7 @@ install: compile
mkdir -p $(STAGING_DIR)/bin mkdir -p $(STAGING_DIR)/bin
$(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/ $(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/
package: package:
clean: clean: FORCE
rm -rf $(UTILS_BUILD_DIR) rm -rf $(UTILS_BUILD_DIR)
$(UTILS_BUILD_DIR): $(UTILS_BUILD_DIR):