3b82343398d4e0ab469cc358650df9ccab1b7ed8
[openwrt.git] / target / linux / image / Makefile
1 include $(TOPDIR)/rules.mk
2
3 KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
4
5 ifeq ($(CONFIG_TARGET_ROOTFS_JFFS2),y)
6 include ./jffs2.mk
7 endif
8
9 ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS_LZMA),y)
10 include ./squashfs.mk
11 endif
12
13 ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
14 include ./tgz.mk
15 endif
16
17 prepare:
18 $(MAKE) prepare-targets
19 compile:
20 $(MAKE) compile-targets
21 install:
22 $(MAKE) install-targets
23
24 .PHONY: prepare compile install
25
26 $(BOARD)-compile:
27 $(MAKE) -C $(BOARD) prepare
28 $(MAKE) -C $(BOARD) compile
29
30 install-ib:
31 -$(MAKE) -C $(BOARD) IB_DIR="$(IB_DIR)" install-ib
32 mkdir -p $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)
33 $(CP) $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk $(IB_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD)/
34
35 install-prepare:
36 find $(BUILD_DIR)/root -type f -not -perm +0100 | xargs chmod 0644
37 find $(BUILD_DIR)/root -type f -perm +0100 | xargs chmod 0755
38 find $(BUILD_DIR)/root -type d | xargs chmod 0755
39 mkdir -p $(BUILD_DIR)/root/tmp
40 chmod 0777 $(BUILD_DIR)/root/tmp
41
42 rebuild: clean prepare compile install
43 clean:
44 $(MAKE) clean-targets
This page took 0.055127 seconds and 3 git commands to generate.