2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
11 include $(INCLUDE_DIR
)/host.mk
15 PKG_OS
:=$(shell uname
-s
)
16 PKG_CPU
:=$(shell uname
-m
)
18 SDK_NAME
:=OpenWrt-SDK-
$(BOARD
)-for-
$(PKG_OS
)-$(PKG_CPU
)
19 SDK_BUILD_DIR
:=$(BUILD_DIR
)/$(SDK_NAME
)
20 EXCLUDE_DIRS
:=*/ccache
*/stamp
*/man
*/share
*/stampfiles
*/info
22 SVN_PACKAGE_URL
=$(shell svn
info ..
/..
/package | awk
'/^URL:/ { print $$2; }')
26 $(BIN_DIR
)/$(SDK_NAME
).
tar.bz2
: clean
27 mkdir
-p
$(SDK_BUILD_DIR
)/dl
$(SDK_BUILD_DIR
)/package
28 $(CP
) $(INCLUDE_DIR
) $(SCRIPT_DIR
) $(TOPDIR
)/docs
$(SDK_BUILD_DIR
)/
29 $(TAR
) -cf
- -C
$(TOPDIR
) $(foreach exclude
,$(EXCLUDE_DIRS
),--exclude
="$(exclude)") --exclude
="staging_dir/$(ARCH)" staging_dir | \
30 $(TAR
) -xf
- -C
$(SDK_BUILD_DIR
)
31 mkdir
-p
$(SDK_BUILD_DIR
)/target
/linux
32 $(CP
) $(GENERIC_PLATFORM_DIR
) $(PLATFORM_DIR
) $(SDK_BUILD_DIR
)/target
/linux
/
34 $(SDK_BUILD_DIR
)/target
/linux
/*/files \
35 $(SDK_BUILD_DIR
)/target
/linux
/*/patches
45 .
/files
/package
/rules.mk \
46 $(TOPDIR
)/package
/Makefile \
47 $(SDK_BUILD_DIR
)/package
/
48 echo
"src-svn trunk $(SVN_PACKAGE_URL)" \
49 > $(SDK_BUILD_DIR
)/feeds.conf.default
50 cat
$(TOPDIR
)/feeds.conf.default \
51 >> $(SDK_BUILD_DIR
)/feeds.conf.default
52 echo REVISION
:="$(REVISION)" > $(SDK_BUILD_DIR
)/include/version.mk
53 find
$(SDK_BUILD_DIR
) -name .git |
$(XARGS
) rm -rf
54 find
$(SDK_BUILD_DIR
) -name .svn |
$(XARGS
) rm -rf
55 find
$(SDK_BUILD_DIR
) -name CVS |
$(XARGS
) rm -rf
57 tar cfj
$@
$(SDK_NAME
); \
62 compile
: $(BIN_DIR
)/$(SDK_NAME
).
tar.bz2
66 rm -rf
$(SDK_BUILD_DIR
) $(BIN_DIR
)/$(SDK_NAME
).
tar.bz2
This page took 0.04372 seconds and 5 git commands to generate.