summaryrefslogtreecommitdiff
path: root/util/kconfig/Makefile
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2009-11-21 19:54:02 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2009-11-21 19:54:02 +0000
commit26774f2b729d791c9dbf5ba0f7fcf4a59e3795a5 (patch)
tree0c6bd1252925799a2f9f7f62707d24b663170302 /util/kconfig/Makefile
parentb198a478ed190552f5228e43bc34391ca7b0f2dd (diff)
downloadcoreboot-26774f2b729d791c9dbf5ba0f7fcf4a59e3795a5.tar.xz
Make the kconfig-style build work in mingw:
* use relative paths in ldscript.ld and crt0_includes.h * avoid use of dd(1) in xcompile * build libregex for kconfig, if necessary * work around missing utsname on win32 * unlink targets before rename on win32 * implement (crude) mkstemp for win32 * avoid open/read/close, use fopen/fread/fclose instead * don't free certain data structures in romcc on win32 to avoid crashes (likely use-after-free()) * handle "\CRLF" and win32 style absolute paths (X:/ or X:\) in romcc * make lzma (part of cbfstool) build on XP * implement ntohl/htonl on win32 * handle CRLF in awk script * set larger stack for romcc on win32 Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4952 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/kconfig/Makefile')
-rw-r--r--util/kconfig/Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/util/kconfig/Makefile b/util/kconfig/Makefile
index 4879b25c5a..fdd86cbfd5 100644
--- a/util/kconfig/Makefile
+++ b/util/kconfig/Makefile
@@ -4,6 +4,12 @@
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
+_OS=$(shell uname -s |cut -c-7)
+regex-objs=
+ifeq ($(_OS),MINGW32)
+ regex-objs=regex.o
+endif
+
Kconfig := src/Kconfig
xconfig: prepare $(objk)/qconf
@@ -113,8 +119,8 @@ HOST_EXTRACFLAGS += -DLOCALE
lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
-conf-objs := conf.o zconf.tab.o
-mconf-objs := mconf.o zconf.tab.o $(lxdialog)
+conf-objs := conf.o zconf.tab.o $(regex-objs)
+mconf-objs := mconf.o zconf.tab.o $(lxdialog) $(regex-objs)
kxgettext-objs := kxgettext.o zconf.tab.o
hostprogs-y := conf qconf gconf kxgettext
@@ -133,11 +139,11 @@ endif
ifeq ($(qconf-target),1)
qconf-cxxobjs := qconf.o
-qconf-objs := kconfig_load.o zconf.tab.o
+qconf-objs := kconfig_load.o zconf.tab.o $(regex-objs)
endif
ifeq ($(gconf-target),1)
-gconf-objs := gconf.o kconfig_load.o zconf.tab.o
+gconf-objs := gconf.o kconfig_load.o zconf.tab.o $(regex-objs)
endif
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
@@ -306,6 +312,8 @@ $(objk)/mconf.o: $(srck)/mconf.c
$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
$(objk)/conf.o: $(srck)/conf.c
$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
+$(objk)/regex.o: $(srck)/regex.c
+ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -DHAVE_STRING_H -c -o $@ $<
$(objk)/zconf.tab.o: $(objk)/zconf.tab.c $(objk)/lex.zconf.c \
$(objk)/zconf.hash.c