summaryrefslogtreecommitdiff
path: root/mk/build.mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-12-11 19:56:36 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2009-12-11 19:56:36 +0100
commitb706a572926dd8ac76de3928bd1290ee880944f8 (patch)
tree54fd6844cd62916103bc10ccd658c92054c31f89 /mk/build.mk
parent4c89b446f8d87344c244cda2eb97657d159905e2 (diff)
try to autodetect host system and make it usable in menusystem
Diffstat (limited to 'mk/build.mk')
-rw-r--r--mk/build.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/mk/build.mk b/mk/build.mk
index f51c92149..2d1d4e035 100644
--- a/mk/build.mk
+++ b/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 \