25d2acc57cf71f2f1dd998da49258569babe0493
[openwrt.git] / target / sdk / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_OS:=$(shell uname -s)
13 PKG_CPU:=$(shell uname -m)
14
15 SDK_NAME:=OpenWrt-SDK-$(BOARD)-$(KERNEL)-for-$(PKG_OS)-$(PKG_CPU)
16 SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)
17
18 all: compile
19
20 $(BIN_DIR)/$(SDK_NAME).tar.bz2:
21 (cd $(STAGING_DIR); \
22 rm -rf info man share stampfiles; \
23 cd usr; \
24 rm -rf doc info man share; \
25 )
26 rm -rf $(SDK_BUILD_DIR)
27 mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/package
28 $(CP) $(STAGING_DIR) $(INCLUDE_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/
29 $(CP) $(TOPDIR)/rules.mk $(TOPDIR)/.config $(SDK_BUILD_DIR)/
30 $(CP) $(TOPDIR)/package/Makefile $(SDK_BUILD_DIR)/package/
31 $(CP) ./files/Makefile.sdk $(SDK_BUILD_DIR)/Makefile
32 $(CP) ./files/README.SDK $(SDK_BUILD_DIR)/
33 echo OPENWRTVERSION:=$(OPENWRTVERSION) > $(SDK_BUILD_DIR)/.version.mk
34 find $(SDK_BUILD_DIR) -name .svn | xargs rm -rf
35 find $(SDK_BUILD_DIR) -name CVS | xargs rm -rf
36 (cd $(BUILD_DIR); \
37 tar cfj $@ $(SDK_NAME); \
38 )
39
40 source:
41 prepare:
42 compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2
43 install:
44
45 clean:
46 rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.bz2
This page took 0.038555 seconds and 3 git commands to generate.