summaryrefslogtreecommitdiff
path: root/scripts
authorkergoth <kergoth>2002-11-05 23:26:33 (UTC)
committer kergoth <kergoth>2002-11-05 23:26:33 (UTC)
commit76f38e36b7a875a1763d1e6ce5e00cc8dd736263 (patch) (unidiff)
tree758e4858912d3ef391200d312a188fc9bffa91d9 /scripts
parentb14da9c14c5f1968fb4ba07c3fa0b3888e57ff2f (diff)
downloadopie-76f38e36b7a875a1763d1e6ce5e00cc8dd736263.zip
opie-76f38e36b7a875a1763d1e6ce5e00cc8dd736263.tar.gz
opie-76f38e36b7a875a1763d1e6ce5e00cc8dd736263.tar.bz2
Adjust makefile to check both /usr/share/qt and /usr/lib/qt for QTDIR, and to check for the existance of qt-mt and qt both
Diffstat (limited to 'scripts') (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
@@ -1,37 +1,57 @@
1VERSION=1.2 1VERSION=1.2
2CC=gcc 2CC=gcc
3CXX=g++ 3CXX=g++
4CFLAGS=-O2 -Wall -g -fPIC 4CFLAGS=-O2 -Wall -g -fPIC
5CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include 5CXXFLAGS=$(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
20lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c 40lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c
21HDR=expr.h lkc.h lkc_proto.h qconf.h 41HDR=expr.h lkc.h lkc_proto.h qconf.h
22OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ 42OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \
23 kconfig.i extconf.rb example 43 kconfig.i extconf.rb example
24INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c conf.c mconf.c qconf.cc kconfig_load.c images.c $(parse_SRC) $(HDR) 44INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c conf.c mconf.c qconf.cc kconfig_load.c images.c $(parse_SRC) $(HDR)
25INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h 45INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h
26 46
27#DEBUG=1 47#DEBUG=1
28ifdef DEBUG 48ifdef DEBUG
29CFLAGS+=-DLKC_DIRECT_LINK 49CFLAGS+=-DLKC_DIRECT_LINK
30qconf_SRC+=$(parse_SRC) 50qconf_SRC+=$(parse_SRC)
31else 51else
32qconf_SRC+=kconfig_load.c 52qconf_SRC+=kconfig_load.c
33endif 53endif
34 54
35SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC) 55SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC)
36CSRC=$(filter %.c, $(SRC)) 56CSRC=$(filter %.c, $(SRC))
37YSRC=$(filter %.y, $(SRC)) 57YSRC=$(filter %.y, $(SRC))
@@ -90,49 +110,49 @@ zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_dep
90#confdata.o: confdata.c $(lkc_deps) 110#confdata.o: confdata.c $(lkc_deps)
91#expr.o: expr.c $(lkc_deps) 111#expr.o: expr.c $(lkc_deps)
92#symbol.o: symbol.c $(lkc_deps) 112#symbol.o: symbol.c $(lkc_deps)
93#menu.o: menu.c $(lkc_deps) 113#menu.o: menu.c $(lkc_deps)
94kconfig_load.o: kconfig_load.c $(lkc_deps) 114kconfig_load.o: kconfig_load.c $(lkc_deps)
95conf.o: conf.c $(lkc_deps) 115conf.o: conf.c $(lkc_deps)
96mconf.o: mconf.c $(lkc_deps) 116mconf.o: mconf.c $(lkc_deps)
97qconf.moc: qconf.h 117qconf.moc: qconf.h
98qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) 118qconf.o: qconf.cc qconf.moc images.c $(lkc_deps)
99 119
100mconf: $(mconf_OBJ) 120mconf: $(mconf_OBJ)
101 $(CC) $(LDFLAGS) $^ -o $@ 121 $(CC) $(LDFLAGS) $^ -o $@
102 122
103conf: $(conf_OBJ) 123conf: $(conf_OBJ)
104 $(CC) $(LDFLAGS) $^ -o $@ 124 $(CC) $(LDFLAGS) $^ -o $@
105 125
106ifeq ($(MOC),) 126ifeq ($(MOC),)
107qconf: 127qconf:
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)
121 $(CC) -shared $^ -o $@ 141 $(CC) -shared $^ -o $@
122 142
123lkc_defs.h: lkc_proto.h 143lkc_defs.h: lkc_proto.h
124 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' 144 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
125 145
126clean: 146clean:
127 rm -f $(OBJ) lkcc conf qconf mconf *.moc lex.* *.tab.? *.output 147 rm -f $(OBJ) lkcc conf qconf mconf *.moc lex.* *.tab.? *.output
128 148
129tgz: 149tgz:
130 mkdir tmp 150 mkdir tmp
131 mkdir tmp/lkc-$(VERSION) 151 mkdir tmp/lkc-$(VERSION)
132 cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) 152 cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION)
133 tar -cpvz -C tmp -f lkc-$(VERSION).tar.gz lkc-$(VERSION) 153 tar -cpvz -C tmp -f lkc-$(VERSION).tar.gz lkc-$(VERSION)
134 rm -rf tmp 154 rm -rf tmp
135 155
136%.tab.c %.tab.h: %.y 156%.tab.c %.tab.h: %.y
137 $(YACC) $(YFLAGS) -b $* -p $* $< 157 $(YACC) $(YFLAGS) -b $* -p $* $<
138 158