summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/kconfig/Makefile22
1 files changed, 21 insertions, 1 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 7553311..caad231 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -6,14 +6,34 @@ CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include
6LDFLAGS= 6LDFLAGS=
7LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib 7LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib
8LEX=flex 8LEX=flex
9YACC=bison 9YACC=bison
10YFLAGS=-d -t -v 10YFLAGS=-d -t -v
11ifndef HOSTQTDIR 11ifndef HOSTQTDIR
12ifeq ($(shell if [ -e /usr/share/qt ]; then echo foundit; fi),foundit)
12HOSTQTDIR=/usr/share/qt 13HOSTQTDIR=/usr/share/qt
14else
15ifeq ($(shell if [ -e /usr/lib/qt ]; then echo foundit; fi),foundit)
16HOSTQTDIR=/usr/lib/qt
17endif
18endif
19endif
20
21ifndef QTLIB
22ifeq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt.so ]; then echo foundit; fi),foundit)
23QTLIB=-lqt
24else
25ifeq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt-mt.so ]; then echo foundit; fi),foundit)
26QTLIB=-lqt-mt
27else
28QTLIB=-lqt
29$(warning Unable to locate libqt.so!)
30endif
13endif 31endif
32endif
33
14MOC=$(wildcard $(HOSTQTDIR)/bin/moc) 34MOC=$(wildcard $(HOSTQTDIR)/bin/moc)
15 35
16parse_SRC=zconf.y 36parse_SRC=zconf.y
17conf_SRC=conf.c $(parse_SRC) 37conf_SRC=conf.c $(parse_SRC)
18mconf_SRC=mconf.c $(parse_SRC) 38mconf_SRC=mconf.c $(parse_SRC)
19qconf_SRC=qconf.cc 39qconf_SRC=qconf.cc
@@ -108,13 +128,13 @@ qconf:
108 @echo Unable to find the QT installation. Please make sure that the 128 @echo Unable to find the QT installation. Please make sure that the
109 @echo QT development package is correctly installed and the HOSTQTDIR 129 @echo QT development package is correctly installed and the HOSTQTDIR
110 @echo environment variable is set to the correct location. 130 @echo environment variable is set to the correct location.
111 @false 131 @false
112else 132else
113qconf: $(qconf_OBJ) libkconfig.so 133qconf: $(qconf_OBJ) libkconfig.so
114 $(CXX) $(LXXFLAGS) $^ -lqt -o $@ 134 $(CXX) $(LXXFLAGS) $^ $(QTLIB) -o $@
115endif 135endif
116 136
117lkcc: $(lkcc_OBJ) 137lkcc: $(lkcc_OBJ)
118 $(CC) $(LDFLAGS) $^ -o $@ 138 $(CC) $(LDFLAGS) $^ -o $@
119 139
120libkconfig.so: $(parse_OBJ) 140libkconfig.so: $(parse_OBJ)