aboutsummaryrefslogtreecommitdiffstats
path: root/project/project.mk
blob: b85fe3915f0b1c0c7db3e6cef2882dc9199bde8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
PROJECT_FILE:=$(LOCAL)/$(PROJECT)/$(PROJECT).config


.PHONY: target-host-info saveconfig getconfig

target-host-info: $(TARGET_DIR)/etc/issue $(TARGET_DIR)/etc/hostname

$(TARGET_DIR)/etc/issue: .config
	mkdir -p $(TARGET_DIR)/etc
	echo "" > $(TARGET_DIR)/etc/issue
	echo "" >> $(TARGET_DIR)/etc/issue
	echo "$(BANNER)" >> $(TARGET_DIR)/etc/issue

$(TARGET_DIR)/etc/hostname: .config
	mkdir -p $(TARGET_DIR)/etc
	echo "$(TARGET_HOSTNAME)" > $(TARGET_DIR)/etc/hostname

saveconfig: $(CONFIG)/conf
	mkdir -p $(LOCAL)/$(PROJECT)
	-cp .config $(PROJECT_FILE)
	if [ -f $(LINUX26_DIR)/.config ]; then \
		cp $(LINUX26_DIR)/.config \
			$(LOCAL)/$(PROJECT)/linux-$(LINUX26_VERSION).config; \
		$(SED) '/BR2_PACKAGE_LINUX_KCONFIG/d' $(PROJECT_FILE); \
		echo "BR2_PACKAGE_LINUX_KCONFIG:=$(LOCAL)/$(PROJECT)/linux-$(LINUX26_VERSION).config" >> $(PROJECT_FILE); \
	fi
	if [ -f $(BUSYBOX_DIR)/.config ]; then \
		cp $(BUSYBOX_DIR)/.config \
			$(LOCAL)/$(PROJECT)/busybox-$(BUSYBOX_VERSION).config; \
		$(SED) '/BR2_PACKAGE_BUSYBOX_CONFIG/d' $(PROJECT_FILE); \
		echo "BR2_PACKAGE_BUSYBOX_CONFIG:=$(LOCAL)/$(PROJECT)/busybox-$(BUSYBOX_VERSION).config" >> $(PROJECT_FILE); \
	fi
	if [ -f $(UCLIBC_DIR)/.config ]; then \
		cp $(UCLIBC_DIR)/.config \
			$(LOCAL)/$(PROJECT)/uclibc-$(UCLIBC_VER).config; \
		$(SED) '/BR2_UCLIBC_CONFIG/d' $(PROJECT_FILE); \
		echo "BR2_UCLIBC_CONFIG:=$(LOCAL)/$(PROJECT)/uclibc-$(UCLIBC_VER).config" >> $(PROJECT_FILE); \
	fi
	if [ -f $(UBOOT_DIR)/include/configs/$(PROJECT).h ]; then \
		cp $(UBOOT_DIR)/include/configs/$(PROJECT).h \
			$(LOCAL)/$(PROJECT)/u-boot/$(PROJECT).h; \
	fi

getconfig: $(CONFIG)/conf
	-cp $(LOCAL)/$(PROJECT)/$(PROJECT).config .config

vendor-dbg:
	@echo VENDOR_SITE=$(BR2_VENDOR_SITE)
	@echo VENDOR_SUFFIX=$(BR2_VENDOR_SUFFIX)
	@echo VENDOR_BINUTILS_RELEASE=$(BR2_VENDOR_BINUTILS_RELEASE)
	@echo VENDOR_GCC_RELEASE=$(BR2_VENDOR_GCC_RELEASE)
	@echo VENDOR_UCLIBC_RELEASE=$(BR2_VENDOR_UCLIBC_RELEASE)
	@echo VENDOR_GDB_RELEASE=$(BR2_VENDOR_GDB_RELEASE)
	@echo VENDOR_PATCH_DIR=$(BR2_VENDOR_PATCH_DIR)