move target/image/platform to target/linux/platform/image platform directories are...
[openwrt/openwrt.git] / target / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/target.mk
9
10 all: install
11
12 $(BIN_DIR):
13 mkdir -p $(BIN_DIR)
14
15 TARGETS-y := linux utils
16 TARGETS-$(CONFIG_SDK) += sdk
17
18 linux-compile: utils-install
19 linux-install: $(BIN_DIR)
20 image_install: linux-install
21
22 IMAGE_DIR:=linux/$(BOARD)-$(KERNEL)/image
23
24
25 download: $(patsubst %,%-download,$(TARGETS-y))
26 prepare: linux-prepare
27 compile: linux-compile image_compile
28 install: image_clean $(patsubst %,%-install,$(TARGETS-y)) image_install
29 clean: $(patsubst %,%-clean,$(TARGETS-y)) image_clean
30
31 prereq: FORCE
32 $(MAKE) -C linux/$(BOARD)-$(KERNEL) prereq
33 $(MAKE) -C $(IMAGE_DIR) prereq
34
35 image_clean: FORCE
36 $(MAKE) -C $(IMAGE_DIR) clean
37 rm -f $(BIN_DIR)/openwrt-*
38
39 image_compile: FORCE
40 $(MAKE) -C $(IMAGE_DIR) compile
41
42 image_install: image_compile
43 $(MAKE) -C $(IMAGE_DIR) install
44
45 %-clean: FORCE
46 $(MAKE) -C $(patsubst %-clean,%,$@) clean
47 %-download: FORCE
48 $(MAKE) -C $(patsubst %-download,%,$@) download
49 %-prepare: FORCE
50 $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
51 %-compile: %-prepare
52 $(MAKE) -C $(patsubst %-compile,%,$@) compile
53 %-install: %-compile
54 $(MAKE) -C $(patsubst %-install,%,$@) install
55