fine tune package, add example conf
[openwrt.git] / openwrt / package / sdk / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_OS:=$(shell uname -s)
6 PKG_CPU:=$(shell uname -m)
7
8 PKG_RELEASE:=1
9 SDK_NAME:=OpenWrt-SDK-$(PKG_OS)-$(PKG_CPU)-$(PKG_RELEASE)
10 IB_NAME:=OpenWrt-ImageBuilder-$(PKG_OS)-$(PKG_CPU)-$(PKG_RELEASE)
11
12 SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)
13 IB_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
14
15 all: compile
16
17 $(BIN_DIR)/$(SDK_NAME).tar.bz2:
18 (cd $(STAGING_DIR); \
19 rm -rf info man share; \
20 cd usr; \
21 rm -rf doc info man share; \
22 )
23 rm -rf $(SDK_BUILD_DIR)
24 mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/examples $(SDK_BUILD_DIR)/package
25 cp -a $(STAGING_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/
26 cp -a $(TOPDIR)/package/strace $(TOPDIR)/package/iproute2 $(SDK_BUILD_DIR)/examples
27 cp $(TOPDIR)/rules.mk $(SDK_BUILD_DIR)/
28 cp ./files/Makefile.sdk $(SDK_BUILD_DIR)/Makefile
29 cp ./files/README.SDK $(SDK_BUILD_DIR)/
30 cp ./files/depend.mk $(SDK_BUILD_DIR)/package/
31 cp $(TOPDIR)/package/rules.mk $(SDK_BUILD_DIR)/package/
32 egrep '^BR2_(ARCH|WGET|STAGING|JLEVEL|LARGEFILE|TARGET_OPT)' $(TOPDIR)/.config > $(SDK_BUILD_DIR)/.config
33 find $(SDK_BUILD_DIR) -name CVS | xargs rm -rf
34 (cd $(BUILD_DIR); \
35 tar cfj $@ $(SDK_NAME); \
36 )
37
38 source:
39 prepare:
40 compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2
41 # FIXME: image builder disabled for now. need to find a way to make it work cleanly with the new kernel structure
42 # $(BIN_DIR)/$(IB_NAME).tar.bz2
43 install:
44
45 clean:
46 rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.bz2 $(BIN_DIR)/$(IB_NAME).tar.bz2
This page took 0.040708 seconds and 5 git commands to generate.