diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-05-25 04:32:27 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-05-25 04:32:27 +0000 |
commit | 3ac1acb9ea70080aaaf49ae211835f057e60eefa (patch) | |
tree | a2e08d2be3224409a033d25af8861d9853e72de7 /obsolete-buildroot/make/system-linux.mk | |
parent | 1eb1b593980fdc06ab92f8e354129b0aadc4f1b0 (diff) |
Initial revision
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/make/system-linux.mk')
-rw-r--r-- | obsolete-buildroot/make/system-linux.mk | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/obsolete-buildroot/make/system-linux.mk b/obsolete-buildroot/make/system-linux.mk new file mode 100644 index 000000000..2f55dd597 --- /dev/null +++ b/obsolete-buildroot/make/system-linux.mk @@ -0,0 +1,59 @@ +############################################################# +# +# System Linux kernel target +# +# This uses an existing linux kernel source tree on +# your build system, and makes no effort at compiling +# anything.... +# +# You will probably want to change LINUX_SOURCE to +# point to wherever you installed you kernel. +# +# -Erik +# +############################################################# +ifneq ($(filter $(TARGETS),system-linux),) + +LINUX_SOURCE=/usr/src/linux +LINUX_DIR=$(BUILD_DIR)/linux +LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel +# Used by pcmcia-cs and others +LINUX_SOURCE_DIR=$(LINUX_SOURCE) + +$(LINUX_DIR)/.configured: + mkdir -p $(LINUX_DIR)/include + (cd $(LINUX_DIR)/include; \ + for i in $(LINUX_SOURCE)/include/*; do ln -sf $$i ; done; \ + rm -f asm; \ + if [ "$(ARCH)" = "powerpc" ];then \ + ln -fs asm-ppc asm; \ + elif [ "$(ARCH)" = "mips" ];then \ + ln -fs asm-mips asm; \ + elif [ "$(ARCH)" = "mipsel" ];then \ + ln -fs asm-mips asm; \ + elif [ "$(ARCH)" = "arm" ];then \ + ln -fs asm-arm asm; \ + (cd asm-arm; \ + if [ ! -L proc ] ; then \ + ln -fs proc-armv proc; \ + ln -fs arch-ebsa285 arch; fi); \ + elif [ "$(ARCH)" = "cris" ];then \ + ln -fs asm-cris asm; \ + else ln -fs asm-$(ARCH) asm; \ + fi) + cp $(LINUX_SOURCE)/Makefile $(LINUX_DIR)/ + cp $(LINUX_SOURCE)/Rules.make $(LINUX_DIR)/ + touch $(LINUX_DIR)/.configured + +$(LINUX_KERNEL): $(LINUX_DIR)/.configured + +system-linux: $(LINUX_DIR)/.configured + +system-linux-clean: clean + rm -f $(LINUX_KERNEL) + rm -rf $(LINUX_DIR) + +system-linux-dirclean: + rm -rf $(LINUX_DIR) + +endif |