-rw-r--r-- | scripts/kconfig/Makefile | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index caad231..6782d4a 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -1,78 +1,76 @@ | |||
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$(HOSTQTDIR)/include | 5 | CXXFLAGS=$(CFLAGS) -I$(HOSTQTDIR)/include |
6 | LDFLAGS= | 6 | LDFLAGS= |
7 | LXXFLAGS=$(LDFLAGS) -L$(HOSTQTDIR)/lib -Wl,-rpath,$(HOSTQTDIR)/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 HOSTQTDIR | 11 | ifndef HOSTQTDIR |
12 | ifeq ($(shell if [ -e /usr/share/qt ]; then echo foundit; fi),foundit) | 12 | ifeq ($(shell if [ -e /usr/share/qt ]; then echo foundit; fi),foundit) |
13 | HOSTQTDIR=/usr/share/qt | 13 | HOSTQTDIR=/usr/share/qt |
14 | else | 14 | else |
15 | ifeq ($(shell if [ -e /usr/lib/qt ]; then echo foundit; fi),foundit) | 15 | ifeq ($(shell if [ -e /usr/lib/qt ]; then echo foundit; fi),foundit) |
16 | HOSTQTDIR=/usr/lib/qt | 16 | HOSTQTDIR=/usr/lib/qt |
17 | endif | 17 | endif |
18 | endif | 18 | endif |
19 | endif | 19 | endif |
20 | 20 | ||
21 | ifndef QTLIB | 21 | ifndef QTLIB |
22 | ifeq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt.so ]; then echo foundit; fi),foundit) | ||
23 | QTLIB=-lqt | ||
24 | else | ||
25 | ifeq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt-mt.so ]; then echo foundit; fi),foundit) | 22 | ifeq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt-mt.so ]; then echo foundit; fi),foundit) |
26 | QTLIB=-lqt-mt | 23 | QTLIB=-lqt-mt |
27 | else | 24 | else |
28 | QTLIB=-lqt | 25 | ifneq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt.so ]; then echo foundit; fi),foundit) |
29 | $(warning Unable to locate libqt.so!) | 26 | $(warning Unable to locate libqt.so!) |
30 | endif | 27 | endif |
28 | QTLIB=-lqt | ||
31 | endif | 29 | endif |
32 | endif | 30 | endif |
33 | 31 | ||
34 | MOC=$(wildcard $(HOSTQTDIR)/bin/moc) | 32 | MOC=$(wildcard $(HOSTQTDIR)/bin/moc) |
35 | 33 | ||
36 | parse_SRC=zconf.y | 34 | parse_SRC=zconf.y |
37 | conf_SRC=conf.c $(parse_SRC) | 35 | conf_SRC=conf.c $(parse_SRC) |
38 | mconf_SRC=mconf.c $(parse_SRC) | 36 | mconf_SRC=mconf.c $(parse_SRC) |
39 | qconf_SRC=qconf.cc | 37 | qconf_SRC=qconf.cc |
40 | lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c | 38 | lkcc_SRC=cml1.y cml1.l help.l cml1.h expr1.c |
41 | HDR=expr.h lkc.h lkc_proto.h qconf.h | 39 | HDR=expr.h lkc.h lkc_proto.h qconf.h |
42 | OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ | 40 | OTHER=README lkc_spec lkc_overview Makefile.kernel convert-all prepare-all.diff fixup-all.diff \ |
43 | kconfig.i extconf.rb example | 41 | kconfig.i extconf.rb example |
44 | 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) | 42 | 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) |
45 | INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h | 43 | INSTGEN=lex.zconf.c zconf.tab.c zconf.tab.h |
46 | 44 | ||
47 | #DEBUG=1 | 45 | #DEBUG=1 |
48 | ifdef DEBUG | 46 | ifdef DEBUG |
49 | CFLAGS+=-DLKC_DIRECT_LINK | 47 | CFLAGS+=-DLKC_DIRECT_LINK |
50 | qconf_SRC+=$(parse_SRC) | 48 | qconf_SRC+=$(parse_SRC) |
51 | else | 49 | else |
52 | qconf_SRC+=kconfig_load.c | 50 | qconf_SRC+=kconfig_load.c |
53 | endif | 51 | endif |
54 | 52 | ||
55 | SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC) | 53 | SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) $(lkcc_SRC) |
56 | CSRC=$(filter %.c, $(SRC)) | 54 | CSRC=$(filter %.c, $(SRC)) |
57 | YSRC=$(filter %.y, $(SRC)) | 55 | YSRC=$(filter %.y, $(SRC)) |
58 | LSRC=$(filter %.l, $(SRC)) | 56 | LSRC=$(filter %.l, $(SRC)) |
59 | 57 | ||
60 | parse_OBJ=$(filter %.o, \ | 58 | parse_OBJ=$(filter %.o, \ |
61 | $(patsubst %.c,%.o, \ | 59 | $(patsubst %.c,%.o, \ |
62 | $(patsubst %.y,%.tab.o, \ | 60 | $(patsubst %.y,%.tab.o, \ |
63 | $(patsubst %.l,lex.%.o, \ | 61 | $(patsubst %.l,lex.%.o, \ |
64 | $(parse_SRC))))) | 62 | $(parse_SRC))))) |
65 | conf_OBJ=$(filter %.o, \ | 63 | conf_OBJ=$(filter %.o, \ |
66 | $(patsubst %.c,%.o, \ | 64 | $(patsubst %.c,%.o, \ |
67 | $(patsubst %.y,%.tab.o, \ | 65 | $(patsubst %.y,%.tab.o, \ |
68 | $(patsubst %.l,lex.%.o, \ | 66 | $(patsubst %.l,lex.%.o, \ |
69 | $(conf_SRC))))) | 67 | $(conf_SRC))))) |
70 | mconf_OBJ=$(filter %.o, \ | 68 | mconf_OBJ=$(filter %.o, \ |
71 | $(patsubst %.c,%.o, \ | 69 | $(patsubst %.c,%.o, \ |
72 | $(patsubst %.y,%.tab.o, \ | 70 | $(patsubst %.y,%.tab.o, \ |
73 | $(patsubst %.l,lex.%.o, \ | 71 | $(patsubst %.l,lex.%.o, \ |
74 | $(mconf_SRC))))) | 72 | $(mconf_SRC))))) |
75 | qconf_OBJ=$(filter %.o, \ | 73 | qconf_OBJ=$(filter %.o, \ |
76 | $(patsubst %.c,%.o, \ | 74 | $(patsubst %.c,%.o, \ |
77 | $(patsubst %.cc,%.o, \ | 75 | $(patsubst %.cc,%.o, \ |
78 | $(patsubst %.y,%.tab.o, \ | 76 | $(patsubst %.y,%.tab.o, \ |