2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
10 include $(INCLUDE_DIR
)/host.mk
14 PKG_OS
:=$(shell uname
-s
)
15 PKG_CPU
:=$(shell uname
-m | sed
"s/ //g")
17 IB_NAME
:=OpenWrt-ImageBuilder-
$(BOARD
)-for-
$(PKG_OS
)-$(PKG_CPU
)
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(IB_NAME
)
19 IB_KDIR
:=$(patsubst $(TOPDIR
)/%,$(PKG_BUILD_DIR
)/%,$(KERNEL_BUILD_DIR
))
23 $(BIN_DIR
)/$(IB_NAME
).
tar.bz2
: clean
24 rm -rf
$(PKG_BUILD_DIR
)
25 mkdir
-p
$(IB_KDIR
) $(PKG_BUILD_DIR
)/staging_dir
/host \
26 $(PKG_BUILD_DIR
)/target
$(PKG_BUILD_DIR
)/scripts
27 -cp
$(TOPDIR
)/.config
$(PKG_BUILD_DIR
)/.config
29 $(INCLUDE_DIR
) $(SCRIPT_DIR
) \
32 .
/files
/repositories.conf \
33 $(TMP_DIR
)/.targetinfo \
34 $(TMP_DIR
)/.packageinfo \
36 $(SED
) 's/$$A/$(BOARD)/' $(PKG_BUILD_DIR
)/repositories.conf
37 $(CP
) $(PACKAGE_DIR
) $(PKG_BUILD_DIR
)/packages
38 $(CP
) $(STAGING_DIR_HOST
)/bin
$(PKG_BUILD_DIR
)/staging_dir
/host
/
39 $(CP
) $(TOPDIR
)/target
/linux
$(PKG_BUILD_DIR
)/target
/
41 $(PKG_BUILD_DIR
)/target
/linux
/*/files
{,-*} \
42 $(PKG_BUILD_DIR
)/target
/linux
/*/patches
{,-*}
43 -cp
$(KERNEL_BUILD_DIR
)/* $(IB_KDIR
)/ # don't copy subdirectories here
44 echo REVISION
:="$(REVISION)" > $(PKG_BUILD_DIR
)/include/version.mk
45 find
$(PKG_BUILD_DIR
) -name CVS
-o
-name .git
-o
-name .svn \
47 $(TAR
) c
-C
$(BUILD_DIR
) $(IB_NAME
) | bzip2
-c
> $@
51 compile
: $(BIN_DIR
)/$(IB_NAME
).
tar.bz2
55 rm -rf
$(PKG_BUILD_DIR
) $(BIN_DIR
)/$(IB_NAME
).
tar.bz2
This page took 0.054196 seconds and 5 git commands to generate.