include .targetinfo in the image builder, and allow direct calls to the package_index...
[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: FORCE
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 $(TMP_DIR)/.targetinfo \
29 ./files/Makefile \
30 $(IB_BUILD_DIR)/
31 $(CP) $(STAGING_DIR)/bin/* $(IB_BUILD_DIR)/staging_dir_$(ARCH)/bin
32 $(CP) $(TOPDIR)/target/linux/* $(IB_BUILD_DIR)/target/linux
33 rm -rf $(IB_BUILD_DIR)/target/linux/*/patches
34 -cp $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/* $(IB_BUILD_DIR)/build_$(ARCH)/linux-$(KERNEL)-$(BOARD) # don't copy subdirectories here
35 find $(IB_BUILD_DIR) -name .svn | xargs rm -rf
36 find $(IB_BUILD_DIR) -name CVS | xargs rm -rf
37 (cd $(BUILD_DIR); \
38 tar cfj $@ $(IB_NAME); \
39 )
40
41 download:
42 prepare:
43 compile: $(BIN_DIR)/$(IB_NAME).tar.bz2
44 install: compile
45
46 clean:
47 rm -rf $(IB_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.bz2
This page took 0.04439 seconds and 5 git commands to generate.