-rw-r--r-- | scripts/kconfig/Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index ed57c6f..b60db9f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -1,26 +1,26 @@ | |||
1 | VERSION=1.2 | 1 | VERSION=1.2 |
2 | CC=gcc | 2 | CC=gcc |
3 | CXX=g++ | 3 | CXX=g++ |
4 | CFLAGS=-O2 -Wall -g -fPIC | 4 | CFLAGS=-O2 -Wall -g -fPIC |
5 | CXXFLAGS=$(CFLAGS) -I$(QTDIR)/include | 5 | CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include |
6 | LDFLAGS= | 6 | LDFLAGS= |
7 | LXXFLAGS=$(LDFLAGS) -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib | 7 | LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/lib |
8 | LEX=flex | 8 | LEX=flex |
9 | YACC=bison | 9 | YACC=bison |
10 | YFLAGS=-d -t -v | 10 | YFLAGS=-d -t -v |
11 | ifndef QTDIR | 11 | ifndef HOSTQTDIR |
12 | QTDIR=/usr/share/qt | 12 | HOSTQTDIR=/usr/share/qt |
13 | endif | 13 | endif |
14 | MOC=$(wildcard $(QTDIR)/bin/moc) | 14 | MOC=$(wildcard $(HOSTQTDIR)/bin/moc) |
15 | 15 | ||
16 | parse_SRC=zconf.y | 16 | parse_SRC=zconf.y |
17 | conf_SRC=conf.c $(parse_SRC) | 17 | conf_SRC=conf.c $(parse_SRC) |
18 | mconf_SRC=mconf.c $(parse_SRC) | 18 | mconf_SRC=mconf.c $(parse_SRC) |
19 | qconf_SRC=qconf.cc | 19 | qconf_SRC=qconf.cc |
20 | lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c | 20 | lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c |
21 | HDR=expr.h lkc.h lkc_proto.h qconf.h | 21 | HDR=expr.h lkc.h lkc_proto.h qconf.h |
22 | OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ | 22 | OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ |
23 | kconfig.i extconf.rb example | 23 | kconfig.i extconf.rb example |
24 | INST=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) | 24 | INST=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) |
25 | INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h | 25 | INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h |
26 | 26 | ||
@@ -97,25 +97,25 @@ mconf.o: mconf.c $(lkc_deps) | |||
97 | qconf.moc: qconf.h | 97 | qconf.moc: qconf.h |
98 | qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) | 98 | qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) |
99 | 99 | ||
100 | mconf: $(mconf_OBJ) | 100 | mconf: $(mconf_OBJ) |
101 | $(CC) $(LDFLAGS) $^ -o $@ | 101 | $(CC) $(LDFLAGS) $^ -o $@ |
102 | 102 | ||
103 | conf: $(conf_OBJ) | 103 | conf: $(conf_OBJ) |
104 | $(CC) $(LDFLAGS) $^ -o $@ | 104 | $(CC) $(LDFLAGS) $^ -o $@ |
105 | 105 | ||
106 | ifeq ($(MOC),) | 106 | ifeq ($(MOC),) |
107 | qconf: | 107 | qconf: |
108 | @echo Unable to find the QT installation. Please make sure that the | 108 | @echo Unable to find the QT installation. Please make sure that the |
109 | @echo QT development package is correctly installed and the QTDIR | 109 | @echo QT development package is correctly installed and the HOSTQTDIR |
110 | @echo environment variable is set to the correct location. | 110 | @echo environment variable is set to the correct location. |
111 | @false | 111 | @false |
112 | else | 112 | else |
113 | qconf: $(qconf_OBJ) | 113 | qconf: $(qconf_OBJ) |
114 | $(CXX) $(LXXFLAGS) $^ -lqt -o $@ | 114 | $(CXX) $(LXXFLAGS) $^ -lqt -o $@ |
115 | endif | 115 | endif |
116 | 116 | ||
117 | lkcc: $(lkcc_OBJ) | 117 | lkcc: $(lkcc_OBJ) |
118 | $(CC) $(LDFLAGS) $^ -o $@ | 118 | $(CC) $(LDFLAGS) $^ -o $@ |
119 | 119 | ||
120 | libkconfig.so: $(parse_OBJ) | 120 | libkconfig.so: $(parse_OBJ) |
121 | $(CC) -shared $^ -o $@ | 121 | $(CC) -shared $^ -o $@ |
@@ -131,25 +131,25 @@ tgz: | |||
131 | mkdir tmp/lkc-$(VERSION) | 131 | mkdir tmp/lkc-$(VERSION) |
132 | cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) | 132 | cp -ra Makefile $(sort $(SRC) $(HDR) $(OTHER) $(INST)) tmp/lkc-$(VERSION) |
133 | tar -cpvz -C tmp -f lkc-$(VERSION).tar.gz lkc-$(VERSION) | 133 | tar -cpvz -C tmp -f lkc-$(VERSION).tar.gz lkc-$(VERSION) |
134 | rm -rf tmp | 134 | rm -rf tmp |
135 | 135 | ||
136 | %.tab.c %.tab.h: %.y | 136 | %.tab.c %.tab.h: %.y |
137 | $(YACC) $(YFLAGS) -b $* -p $* $< | 137 | $(YACC) $(YFLAGS) -b $* -p $* $< |
138 | 138 | ||
139 | lex.%.c: %.l | 139 | lex.%.c: %.l |
140 | $(LEX) $(LFLAGS) -P$* $< | 140 | $(LEX) $(LFLAGS) -P$* $< |
141 | 141 | ||
142 | %.moc: %.h | 142 | %.moc: %.h |
143 | $(QTDIR)/bin/moc -i $< -o $@ | 143 | $(HOSTQTDIR)/bin/moc -i $< -o $@ |
144 | 144 | ||
145 | %.o: %.c | 145 | %.o: %.c |
146 | $(CC) $(CFLAGS) -c $< -o $@ | 146 | $(CC) $(CFLAGS) -c $< -o $@ |
147 | 147 | ||
148 | %.o: %.cc | 148 | %.o: %.cc |
149 | $(CXX) $(CXXFLAGS) -c $< -o $@ | 149 | $(CXX) $(CXXFLAGS) -c $< -o $@ |
150 | 150 | ||
151 | ifdef KERNELSRC | 151 | ifdef KERNELSRC |
152 | install: lkcc $(INSTGEN) | 152 | install: lkcc $(INSTGEN) |
153 | set -x; mkdir $(KERNELSRC)/scripts/kconfig; \ | 153 | set -x; mkdir $(KERNELSRC)/scripts/kconfig; \ |
154 | cp $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \ | 154 | cp $(sort $(INST)) $(KERNELSRC)/scripts/kconfig; \ |
155 | for f in $(INSTGEN); do cp $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \ | 155 | for f in $(INSTGEN); do cp $$f $(KERNELSRC)/scripts/kconfig/$${f}_shipped; done; \ |