jffs2 patches
[openwrt.git] / obsolete-buildroot / make / system-linux.mk
1 #############################################################
2 #
3 # System Linux kernel target
4 #
5 # This uses an existing linux kernel source tree on
6 # your build system, and makes no effort at compiling
7 # anything....
8 #
9 # You will probably want to change LINUX_SOURCE to
10 # point to wherever you installed you kernel.
11 #
12 # -Erik
13 #
14 #############################################################
15 ifneq ($(filter $(TARGETS),system-linux),)
16
17 LINUX_SOURCE=/usr/src/linux
18 LINUX_DIR=$(BUILD_DIR)/linux
19 LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel
20 # Used by pcmcia-cs and others
21 LINUX_SOURCE_DIR=$(LINUX_SOURCE)
22
23 $(LINUX_DIR)/.configured:
24 mkdir -p $(LINUX_DIR)/include
25 (cd $(LINUX_DIR)/include; \
26 for i in $(LINUX_SOURCE)/include/*; do ln -sf $$i ; done; \
27 rm -f asm; \
28 if [ "$(ARCH)" = "powerpc" ];then \
29 ln -fs asm-ppc asm; \
30 elif [ "$(ARCH)" = "mips" ];then \
31 ln -fs asm-mips asm; \
32 elif [ "$(ARCH)" = "mipsel" ];then \
33 ln -fs asm-mips asm; \
34 elif [ "$(ARCH)" = "arm" ];then \
35 ln -fs asm-arm asm; \
36 (cd asm-arm; \
37 if [ ! -L proc ] ; then \
38 ln -fs proc-armv proc; \
39 ln -fs arch-ebsa285 arch; fi); \
40 elif [ "$(ARCH)" = "cris" ];then \
41 ln -fs asm-cris asm; \
42 else ln -fs asm-$(ARCH) asm; \
43 fi)
44 cp $(LINUX_SOURCE)/Makefile $(LINUX_DIR)/
45 cp $(LINUX_SOURCE)/Rules.make $(LINUX_DIR)/
46 touch $(LINUX_DIR)/.configured
47
48 $(LINUX_KERNEL): $(LINUX_DIR)/.configured
49
50 system-linux: $(LINUX_DIR)/.configured
51
52 system-linux-clean: clean
53 rm -f $(LINUX_KERNEL)
54 rm -rf $(LINUX_DIR)
55
56 system-linux-dirclean:
57 rm -rf $(LINUX_DIR)
58
59 endif
This page took 0.044972 seconds and 5 git commands to generate.