add missing header file
[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 include $(INCLUDE_DIR)/host.mk
12
13 PKG_OS:=$(shell uname -s)
14 PKG_CPU:=$(shell uname -m)
15
16 SDK_NAME:=OpenWrt-SDK-$(BOARD)-for-$(PKG_OS)-$(PKG_CPU)
17 SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)
18 EXCLUDE_DIRS:=*/ccache */stamp */man */share */stampfiles */info
19
20 all: compile
21
22 $(BIN_DIR)/$(SDK_NAME).tar.bz2: clean
23 mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/package
24 $(CP) $(INCLUDE_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/
25 $(TAR) -cf - -C $(TOPDIR) $(foreach exclude,$(EXCLUDE_DIRS),--exclude="$(exclude)") --exclude="staging_dir/$(ARCH)" staging_dir | \
26 $(TAR) -xf - -C $(SDK_BUILD_DIR)
27 mkdir -p $(SDK_BUILD_DIR)/target/linux
28 $(CP) $(GENERIC_PLATFORM_DIR) $(PLATFORM_DIR) $(SDK_BUILD_DIR)/target/linux/
29 rm -rf \
30 $(SDK_BUILD_DIR)/target/linux/*/files \
31 $(SDK_BUILD_DIR)/target/linux/*/patches
32 $(CP) \
33 $(TOPDIR)/rules.mk \
34 $(TOPDIR)/.config \
35 ./files/Makefile \
36 ./files/README.SDK \
37 $(SDK_BUILD_DIR)/
38 $(CP) \
39 ./files/package/rules.mk \
40 $(TOPDIR)/package/Makefile \
41 $(SDK_BUILD_DIR)/package/
42 echo REVISION:="$(REVISION)" > $(SDK_BUILD_DIR)/include/version.mk
43 find $(SDK_BUILD_DIR) -name .git | $(XARGS) rm -rf
44 find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf
45 find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf
46 (cd $(BUILD_DIR); \
47 tar cfj $@ $(SDK_NAME); \
48 )
49
50 download:
51 prepare:
52 compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2
53 install: compile
54
55 clean:
56 rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.bz2
This page took 0.052802 seconds and 5 git commands to generate.