add kernel boot command line
[openwrt.git] / openwrt / target / Makefile
1 include $(TOPDIR)/rules.mk
2
3 # Default target skeleton stuff, may be overridden
4 TARGET_SKEL_DIR=default/target_skeleton
5
6 all: install
7
8 $(TARGET_DIR):
9 mkdir -p $(TARGET_DIR)
10 if [ -f "$(TARGET_SKELETON)" ] ; then \
11 zcat $(TARGET_SKELETON) | tar -C $(BUILD_DIR) -xf -; \
12 fi;
13 if [ -d "$(TARGET_SKEL_DIR)" ] ; then \
14 cp -a $(TARGET_SKEL_DIR)/* $(TARGET_DIR)/; \
15 fi;
16 mkdir -p $(TARGET_DIR)/jffs
17 mkdir -p $(TARGET_DIR)/dev
18 mkdir -p $(TARGET_DIR)/proc
19 mkdir -p $(TARGET_DIR)/tmp
20 mkdir -p $(TARGET_DIR)/lib
21 mkdir -p $(TARGET_DIR)/usr/lib
22 mkdir -p $(TARGET_DIR)/usr/bin
23 ln -sf /tmp/resolv.conf $(TARGET_DIR)/etc/resolv.conf
24 rm -rf $(TARGET_DIR)/var
25 ln -sf /tmp $(TARGET_DIR)/var
26 -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf
27 -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf
28
29 $(BIN_DIR):
30 mkdir -p $(BIN_DIR)
31
32 $(TARGET_DIR)/etc/sysconf:
33 mkdir -p $(TARGET_DIR)/etc
34 -grep \^BR2_SYSCONF $(TOPDIR)/.config > $(TARGET_DIR)/etc/sysconf
35
36 linux-compile: utils-install lzma-install
37 linux-install: $(TARGET_DIR)/etc/sysconf $(BIN_DIR)
38
39 prepare: $(TARGET_DIR)
40 compile: linux-compile
41 install: image_clean linux-install
42 clean: linux-clean utils-clean lzma-clean image_clean
43
44 image_clean:
45 rm -f $(BIN_DIR)/openwrt-*
46
47 %-clean:
48 $(MAKE) -C $(patsubst %-clean,%,$@) clean
49 %-prepare:
50 $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
51 %-compile: %-prepare
52 $(MAKE) -C $(patsubst %-compile,%,$@) compile
53 %-rebuild:
54 $(MAKE) -C $(patsubst %-rebuild,%,$@) rebuild
55 %-install: %-compile
56 $(MAKE) -C $(patsubst %-install,%,$@) install
57
58
This page took 0.042145 seconds and 5 git commands to generate.