[package] base-files: fixup resolv.conf check in udhcpc script
[openwrt.git] / target / sdk / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10 include $(INCLUDE_DIR)/host.mk
11
12 override MAKEFLAGS=
13
14 PKG_OS:=$(shell uname -s)
15 PKG_CPU:=$(shell uname -m)
16
17 SDK_NAME:=OpenWrt-SDK-$(BOARD)-for-$(PKG_OS)-$(PKG_CPU)
18 SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)
19 EXCLUDE_DIRS:=*/ccache */stamp */man */share */stampfiles */info
20
21 SVN_PACKAGE_URL=$(shell svn info ../../package | awk '/^URL:/ { print $$2; }')
22
23 all: compile
24
25 $(BIN_DIR)/$(SDK_NAME).tar.bz2: clean
26 mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/package
27 $(CP) $(INCLUDE_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/
28 $(TAR) -cf - -C $(TOPDIR) $(foreach exclude,$(EXCLUDE_DIRS),--exclude="$(exclude)") --exclude="staging_dir/$(ARCH)" staging_dir | \
29 $(TAR) -xf - -C $(SDK_BUILD_DIR)
30 mkdir -p $(SDK_BUILD_DIR)/target/linux
31 $(CP) $(GENERIC_PLATFORM_DIR) $(PLATFORM_DIR) $(SDK_BUILD_DIR)/target/linux/
32 rm -rf \
33 $(SDK_BUILD_DIR)/target/linux/*/files \
34 $(SDK_BUILD_DIR)/target/linux/*/patches
35 $(CP) \
36 $(TOPDIR)/LICENSE \
37 $(TOPDIR)/rules.mk \
38 $(TOPDIR)/.config \
39 ./files/Config.in \
40 ./files/Makefile \
41 ./files/README.SDK \
42 $(SDK_BUILD_DIR)/
43 $(CP) \
44 ./files/package/rules.mk \
45 $(TOPDIR)/package/Makefile \
46 $(SDK_BUILD_DIR)/package/
47 echo "src-svn trunk $(SVN_PACKAGE_URL)" \
48 > $(SDK_BUILD_DIR)/feeds.conf.default
49 cat $(TOPDIR)/feeds.conf.default \
50 >> $(SDK_BUILD_DIR)/feeds.conf.default
51 echo REVISION:="$(REVISION)" > $(SDK_BUILD_DIR)/include/version.mk
52 find $(SDK_BUILD_DIR) -name .git | $(XARGS) rm -rf
53 find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf
54 find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf
55 (cd $(BUILD_DIR); \
56 tar cfj $@ $(SDK_NAME); \
57 )
58
59 download:
60 prepare:
61 compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2
62 install: compile
63
64 clean:
65 rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.bz2
This page took 0.046759 seconds and 5 git commands to generate.