add buildroot-ng support to the whiterussian sdk
[openwrt/svn-archive/archive.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
11 SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)
12 IB_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
13
14 all: compile
15
16 $(BIN_DIR)/$(SDK_NAME).tar.bz2:
17 (cd $(STAGING_DIR); \
18 rm -rf info man share; \
19 cd usr; \
20 rm -rf doc info man share; \
21 )
22 rm -rf $(SDK_BUILD_DIR)
23 mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/examples $(SDK_BUILD_DIR)/package
24 cp -a $(STAGING_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/
25 cp -a $(TOPDIR)/package/strace $(TOPDIR)/package/iproute2 $(SDK_BUILD_DIR)/examples
26 cp $(TOPDIR)/package/rules.mk $(SDK_BUILD_DIR)/package/
27 -cp -a ./files/* $(SDK_BUILD_DIR)/
28 egrep '^BR2_(ARCH|WGET|STAGING|JLEVEL|LARGEFILE|TARGET_OPT)' $(TOPDIR)/.config > $(SDK_BUILD_DIR)/.config
29 egrep '^BR2_(ARCH|WGET|STAGING|JLEVEL|LARGEFILE|TARGET_OPT)' $(TOPDIR)/.config | sed -e s,BR2_,CONFIG_,g >> $(SDK_BUILD_DIR)/.config
30 find $(SDK_BUILD_DIR) -name .svn | xargs rm -rf
31 find $(SDK_BUILD_DIR) -name CVS | xargs rm -rf
32 (cd $(BUILD_DIR); \
33 tar cfj $@ $(SDK_NAME); \
34 )
35
36 source:
37 prepare:
38 compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2
39 install:
40
41 clean:
42 rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.bz2