Add initial version of the new Image Builder
[openwrt.git] / target / imagebuilder / 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: Makefile 6070 2007-01-10 21:21:59Z nbd $
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 IB_NAME:=OpenWrt-ImageBuilder-$(BOARD)-$(KERNEL)-for-$(PKG_OS)-$(PKG_CPU)
17 IB_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
18
19 all: compile
20
21 $(BIN_DIR)/$(IB_NAME).tar.bz2:
22 rm -rf $(IB_BUILD_DIR)
23 mkdir -p $(IB_BUILD_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) $(IB_BUILD_DIR)/staging_dir_$(ARCH)/bin $(IB_BUILD_DIR)/target/linux
24 $(CP) \
25 $(INCLUDE_DIR) $(SCRIPT_DIR) $(PACKAGE_DIR) \
26 $(TOPDIR)/rules.mk $(TOPDIR)/.config \
27 $(TMP_DIR)/.target.mk \
28 ./files/Makefile \
29 $(IB_BUILD_DIR)/
30 $(CP) $(STAGING_DIR)/bin/* $(IB_BUILD_DIR)/staging_dir_$(ARCH)/bin
31 $(CP) $(TOPDIR)/target/linux/* $(IB_BUILD_DIR)/target/linux
32 rm -rf $(IB_BUILD_DIR)/target/linux/*/patches
33 -cp $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/* $(IB_BUILD_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) # don't copy subdirectories here
34 find $(IB_BUILD_DIR) -name .svn | xargs rm -rf
35 find $(IB_BUILD_DIR) -name CVS | xargs rm -rf
36 (cd $(BUILD_DIR); \
37 tar cfj $@ $(IB_NAME); \
38 )
39
40 download:
41 prepare:
42 compile: $(BIN_DIR)/$(IB_NAME).tar.bz2
43 install: compile
44
45 clean:
46 rm -rf $(IB_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.bz2
This page took 0.049614 seconds and 5 git commands to generate.