Browse Source

try to autodetect host system and make it usable in menusystem

Waldemar Brodkorb 15 years ago
parent
commit
b706a57292
3 changed files with 23 additions and 4 deletions
  1. 13 0
      Config.in
  2. 8 4
      mk/build.mk
  3. 2 0
      target/Config.in

+ 13 - 0
Config.in

@@ -7,6 +7,7 @@ config ADKVERSION
 
 mainmenu "OpenADK Configuration"
 
+
 config MODULES
 	bool
 	default y
@@ -90,6 +91,18 @@ config ADK_FORCE_PARALLEL
 	help
 	  Do not enable this! It's for testing purposes only.
 
+choice 
+prompt "Hostsystem (do not change!)"
+config ADK_HOST_LINUX
+	prompt "Linux"
+	boolean
+
+config ADK_HOST_FREEBSD
+	prompt "FreeBSD"
+	boolean
+
+endchoice
+
 endmenu
 
 source "target/Config.in"

+ 8 - 4
mk/build.mk

@@ -224,11 +224,17 @@ $(CONFIG)/mconf:
 	@$(MAKE) -C $(CONFIG)
 
 defconfig:
+ifeq (${OStype},Linux)
+	@echo ADK_HOST_LINUX=y > $(TOPDIR)/.defconfig
+endif
+ifeq (${OStype},FreeBSD)
+	@echo ADK_HOST_FREEBSD=y > $(TOPDIR)/.defconfig
+endif
 	@if [ ! -z "$(TARGET)" ];then \
 		grep "^config" target/Config.in \
 			|grep -i "$(TARGET)" \
 			|sed -e "s#^config \(.*\)#\1=y#" \
-			 > $(TOPDIR)/.defconfig; \
+			 >> $(TOPDIR)/.defconfig; \
 		for symbol in ${DEFCONFIG}; do \
 			echo $$symbol >> $(TOPDIR)/.defconfig; \
 		done; \
@@ -242,9 +248,7 @@ endif
 ifneq (,$(filter rb%,${TARGET}))
 	@echo ADK_LINUX_MIKROTIK=y >> $(TOPDIR)/.defconfig
 endif
-	@if [ ! -z "$(TARGET)" ];then \
-		$(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \
-	fi
+	@$(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN)
 
 modconfig:
 	@if [ ! -z "$(TARGET)" ];then \

+ 2 - 0
target/Config.in

@@ -789,4 +789,6 @@ config ADK_TARGET_PACKAGE_RPM
 
 endchoice
 
+
 endmenu
+