n810: omapfb and keyboard fixes
[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)-gcc-$(GCCV)_$(LIBC)-$(LIBCV)
18 SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)
19 EXCLUDE_DIRS:=*/ccache \
20 */stamp \
21 */stampfiles \
22 */man \
23 */info
24
25 SVN_PACKAGE_URL=$(shell svn info ../../package | awk '/^URL:/ { print $$2; }')
26
27 all: compile
28
29 $(BIN_DIR)/$(SDK_NAME).tar.bz2: clean
30 mkdir -p $(SDK_BUILD_DIR)/dl $(SDK_BUILD_DIR)/package
31 $(CP) $(INCLUDE_DIR) $(SCRIPT_DIR) $(TOPDIR)/docs $(SDK_BUILD_DIR)/
32 $(TAR) -cf - -C $(TOPDIR) $(foreach exclude,$(EXCLUDE_DIRS),--exclude="$(exclude)") --exclude="staging_dir/$(ARCH)" staging_dir/host staging_dir/target-$(ARCH)$(ARCH_SUFFIX)_$(LIBC)-$(LIBCV) staging_dir/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)_$(LIBC)-$(LIBCV) | \
33 $(TAR) -xf - -C $(SDK_BUILD_DIR)
34 mkdir -p $(SDK_BUILD_DIR)/target/linux
35 $(CP) $(GENERIC_PLATFORM_DIR) $(PLATFORM_DIR) $(SDK_BUILD_DIR)/target/linux/
36 rm -rf \
37 $(SDK_BUILD_DIR)/target/linux/*/files \
38 $(SDK_BUILD_DIR)/target/linux/*/patches
39 $(CP) \
40 $(TOPDIR)/LICENSE \
41 $(TOPDIR)/rules.mk \
42 $(TOPDIR)/.config \
43 ./files/Config.in \
44 ./files/Makefile \
45 ./files/README.SDK \
46 $(SDK_BUILD_DIR)/
47 $(CP) \
48 ./files/package/rules.mk \
49 $(TOPDIR)/package/Makefile \
50 $(SDK_BUILD_DIR)/package/
51 echo "src-svn trunk $(SVN_PACKAGE_URL)" \
52 > $(SDK_BUILD_DIR)/feeds.conf.default
53 cat $(TOPDIR)/feeds.conf.default \
54 >> $(SDK_BUILD_DIR)/feeds.conf.default
55 echo REVISION:="$(REVISION)" > $(SDK_BUILD_DIR)/include/version.mk
56 find $(SDK_BUILD_DIR) -name .git | $(XARGS) rm -rf
57 find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf
58 find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf
59 (cd $(BUILD_DIR); \
60 tar cfj $@ $(SDK_NAME); \
61 )
62
63 download:
64 prepare:
65 compile: $(BIN_DIR)/$(SDK_NAME).tar.bz2
66 install: compile
67
68 clean:
69 rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.bz2
This page took 0.048756 seconds and 5 git commands to generate.