6d5f61ad1118bce69c005504348e56e982f3db50
[openwrt.git] / package / sdk / files / Makefile.sdk
1 # OpenWrt SDK Makefile
2 TOPDIR:=${shell pwd}
3 export TOPDIR
4 DEVELOPER:=1
5 export DEVELOPER
6
7 include $(TOPDIR)/rules.mk
8 include $(TOPDIR)/package/depend.mk
9
10 PACKAGES:=$(filter-out %.mk,$(shell ls $(TOPDIR)/package))
11 PACKAGES_PREPARE:=$(foreach package,$(PACKAGES),$(package)-prepare)
12 PACKAGES_COMPILE:=$(foreach package,$(PACKAGES),$(package)-compile)
13 PACKAGES_CLEAN:=$(foreach package,$(PACKAGES),$(package)-clean)
14
15 all: compile package_index
16 compile: $(PACKAGES_COMPILE)
17 clean: $(PACKAGES_CLEAN)
18 rm -rf $(BUILD_DIR)
19 rm -rf bin
20
21 distclean: clean
22 rm -rf $(DL_DIR)
23
24 %-prepare: $(BUILD_DIR)
25 @$(MAKE) -C package/$(patsubst %-prepare,%,$@) prepare
26
27 %-compile: %-prepare
28 @$(MAKE) -C package/$(patsubst %-compile,%,$@) compile
29
30 %-clean:
31 @$(MAKE) -C package/$(patsubst %-clean,%,$@) clean
32
33
34 $(BUILD_DIR):
35 mkdir -p $@
36 mkdir -p $(DL_DIR)
37
38 package_index:
39 (cd $(PACKAGE_DIR); \
40 $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages \
41 )
42
This page took 0.054551 seconds and 3 git commands to generate.