summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/kconfig/Makefile4
-rw-r--r--scripts/lxdialog/Makefile2
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 6006a80..492eb0a 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -1,99 +1,99 @@
1VERSION=1.4 1VERSION=1.4
2CC=gcc 2CC=$(CCACHE) gcc
3CXX=g++ 3CXX=$(CCACHE) g++
4CFLAGS=-O0 -Wall -g -fPIC 4CFLAGS=-O0 -Wall -g -fPIC
5CXXFLAGS=$(CFLAGS) -I$(QTDIR)/include 5CXXFLAGS=$(CFLAGS) -I$(QTDIR)/include
6LDFLAGS= 6LDFLAGS=
7LXXFLAGS=$(LDFLAGS) -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib 7LXXFLAGS=$(LDFLAGS) -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib
8LEX=flex 8LEX=flex
9LFLAGS=-L 9LFLAGS=-L
10YACC=bison 10YACC=bison
11YFLAGS=-l 11YFLAGS=-l
12#YFLAGS=-t -v -l 12#YFLAGS=-t -v -l
13ifndef QTDIR 13ifndef QTDIR
14QTDIR=/usr/share/qt3 14QTDIR=/usr/share/qt3
15endif 15endif
16MOC=$(wildcard $(QTDIR)/bin/moc) 16MOC=$(wildcard $(QTDIR)/bin/moc)
17GTKCFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` 17GTKCFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags`
18GTKLDFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` 18GTKLDFLAGS=`pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
19 19
20parse_SRC=zconf.y 20parse_SRC=zconf.y
21conf_SRC=conf.c $(parse_SRC) 21conf_SRC=conf.c $(parse_SRC)
22mconf_SRC=mconf.c $(parse_SRC) 22mconf_SRC=mconf.c $(parse_SRC)
23qconf_SRC=qconf.cc 23qconf_SRC=qconf.cc
24gconf_SRC=gconf.c kconfig_load.c 24gconf_SRC=gconf.c kconfig_load.c
25HDR=expr.h lkc.h lkc_proto.h qconf.h 25HDR=expr.h lkc.h lkc_proto.h qconf.h
26OTHER=README lkc-language.txt Makefile.kernel \ 26OTHER=README lkc-language.txt Makefile.kernel \
27 kconfig.i extconf.rb example 27 kconfig.i extconf.rb example
28INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c \ 28INST=zconf.y zconf.l confdata.c expr.c symbol.c menu.c \
29 conf.c mconf.c qconf.cc gconf.c gconf.glade kconfig_load.c images.c $(HDR) 29 conf.c mconf.c qconf.cc gconf.c gconf.glade kconfig_load.c images.c $(HDR)
30INSTGEN=lex.zconf.c zconf.tab.c 30INSTGEN=lex.zconf.c zconf.tab.c
31 31
32#DEBUG=1 32#DEBUG=1
33ifdef DEBUG 33ifdef DEBUG
34CFLAGS+=-DLKC_DIRECT_LINK 34CFLAGS+=-DLKC_DIRECT_LINK
35qconf_SRC+=$(parse_SRC) 35qconf_SRC+=$(parse_SRC)
36else 36else
37qconf_SRC+=kconfig_load.c 37qconf_SRC+=kconfig_load.c
38endif 38endif
39 39
40SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC) 40SRC=$(conf_SRC) $(mconf_SRC) $(qconf_SRC)
41CSRC=$(filter %.c, $(SRC)) 41CSRC=$(filter %.c, $(SRC))
42YSRC=$(filter %.y, $(SRC)) 42YSRC=$(filter %.y, $(SRC))
43LSRC=$(filter %.l, $(SRC)) 43LSRC=$(filter %.l, $(SRC))
44 44
45parse_OBJ=$(filter %.o, \ 45parse_OBJ=$(filter %.o, \
46 $(patsubst %.c,%.o, \ 46 $(patsubst %.c,%.o, \
47 $(patsubst %.y,%.tab.o, \ 47 $(patsubst %.y,%.tab.o, \
48 $(patsubst %.l,lex.%.o, \ 48 $(patsubst %.l,lex.%.o, \
49 $(parse_SRC))))) 49 $(parse_SRC)))))
50conf_OBJ=$(filter %.o, \ 50conf_OBJ=$(filter %.o, \
51 $(patsubst %.c,%.o, \ 51 $(patsubst %.c,%.o, \
52 $(patsubst %.y,%.tab.o, \ 52 $(patsubst %.y,%.tab.o, \
53 $(patsubst %.l,lex.%.o, \ 53 $(patsubst %.l,lex.%.o, \
54 $(conf_SRC))))) 54 $(conf_SRC)))))
55mconf_OBJ=$(filter %.o, \ 55mconf_OBJ=$(filter %.o, \
56 $(patsubst %.c,%.o, \ 56 $(patsubst %.c,%.o, \
57 $(patsubst %.y,%.tab.o, \ 57 $(patsubst %.y,%.tab.o, \
58 $(patsubst %.l,lex.%.o, \ 58 $(patsubst %.l,lex.%.o, \
59 $(mconf_SRC))))) 59 $(mconf_SRC)))))
60qconf_OBJ=$(filter %.o, \ 60qconf_OBJ=$(filter %.o, \
61 $(patsubst %.c,%.o, \ 61 $(patsubst %.c,%.o, \
62 $(patsubst %.cc,%.o, \ 62 $(patsubst %.cc,%.o, \
63 $(patsubst %.y,%.tab.o, \ 63 $(patsubst %.y,%.tab.o, \
64 $(patsubst %.l,lex.%.o, \ 64 $(patsubst %.l,lex.%.o, \
65 $(qconf_SRC)))))) 65 $(qconf_SRC))))))
66gconf_OBJ=$(filter %.o, \ 66gconf_OBJ=$(filter %.o, \
67 $(patsubst %.c,%.o, \ 67 $(patsubst %.c,%.o, \
68 $(patsubst %.y,%.tab.o, \ 68 $(patsubst %.y,%.tab.o, \
69 $(patsubst %.l,lex.%.o, \ 69 $(patsubst %.l,lex.%.o, \
70 $(gconf_SRC))))) 70 $(gconf_SRC)))))
71OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ) 71OBJ=$(conf_OBJ) $(mconf_OBJ) $(qconf_OBJ)
72 72
73ifeq ($(MOC),) 73ifeq ($(MOC),)
74all: conf mconf 74all: conf mconf
75else 75else
76all: conf mconf qconf libkconfig.so 76all: conf mconf qconf libkconfig.so
77endif 77endif
78 78
79lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h 79lkc_deps := lkc.h lkc_proto.h lkc_defs.h expr.h
80 80
81zconf.tab.c: zconf.y 81zconf.tab.c: zconf.y
82zconf.tab.h: zconf.y 82zconf.tab.h: zconf.y
83lex.zconf.c: zconf.l 83lex.zconf.c: zconf.l
84zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) 84zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps)
85#lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps) 85#lex.zconf.o: lex.zconf.c zconf.tab.h $(lkc_deps)
86#confdata.o: confdata.c $(lkc_deps) 86#confdata.o: confdata.c $(lkc_deps)
87#expr.o: expr.c $(lkc_deps) 87#expr.o: expr.c $(lkc_deps)
88#symbol.o: symbol.c $(lkc_deps) 88#symbol.o: symbol.c $(lkc_deps)
89#menu.o: menu.c $(lkc_deps) 89#menu.o: menu.c $(lkc_deps)
90kconfig_load.o: kconfig_load.c $(lkc_deps) 90kconfig_load.o: kconfig_load.c $(lkc_deps)
91conf.o: conf.c $(lkc_deps) 91conf.o: conf.c $(lkc_deps)
92mconf.o: mconf.c $(lkc_deps) 92mconf.o: mconf.c $(lkc_deps)
93qconf.moc: qconf.h 93qconf.moc: qconf.h
94qconf.o: qconf.cc qconf.moc images.c $(lkc_deps) 94qconf.o: qconf.cc qconf.moc images.c $(lkc_deps)
95gconf.o: gconf.c $(lkc_deps) 95gconf.o: gconf.c $(lkc_deps)
96 96
97mconf: $(mconf_OBJ) 97mconf: $(mconf_OBJ)
98 $(CC) $(LDFLAGS) $^ -o $@ 98 $(CC) $(LDFLAGS) $^ -o $@
99 99
diff --git a/scripts/lxdialog/Makefile b/scripts/lxdialog/Makefile
index 6d05cfd..e606d4b 100644
--- a/scripts/lxdialog/Makefile
+++ b/scripts/lxdialog/Makefile
@@ -1,56 +1,56 @@
1HOST_EXTRACFLAGS := -DLOCALE 1HOST_EXTRACFLAGS := -DLOCALE
2HOST_LOADLIBES := -lncurses 2HOST_LOADLIBES := -lncurses
3HOSTCC = gcc 3HOSTCC = $(CCACHE) gcc
4 4
5ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) 5ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
6HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" 6HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
7else 7else
8ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) 8ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
9HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" 9HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
10else 10else
11ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) 11ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
12HOST_EXTRACFLAGS += -DCURSES_LOC="<ncurses.h>" 12HOST_EXTRACFLAGS += -DCURSES_LOC="<ncurses.h>"
13else 13else
14HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>" 14HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>"
15endif 15endif
16endif 16endif
17endif 17endif
18 18
19ifeq ($(filter clean mrproper distclean,$(MAKECMDGOALS)),) 19ifeq ($(filter clean mrproper distclean,$(MAKECMDGOALS)),)
20ifeq ($(filter -DCURSES_LOC%,$(HOST_EXTRACFLAGS)),) 20ifeq ($(filter -DCURSES_LOC%,$(HOST_EXTRACFLAGS)),)
21$(error Unable to locate ncurses.h or curses.h) 21$(error Unable to locate ncurses.h or curses.h)
22endif 22endif
23endif 23endif
24 24
25 host-progs:= lxdialog 25 host-progs:= lxdialog
26 always := $(host-progs) 26 always := $(host-progs)
27 27
28lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ 28lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
29 util.o lxdialog.o msgbox.o 29 util.o lxdialog.o msgbox.o
30 30
31first_rule: ncurses lxdialog 31first_rule: ncurses lxdialog
32 32
33.PHONY: ncurses 33.PHONY: ncurses
34ncurses: 34ncurses:
35 @echo "main() {}" > lxtemp.c 35 @echo "main() {}" > lxtemp.c
36 @if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \ 36 @if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \
37 rm -f lxtemp.c a.out; \ 37 rm -f lxtemp.c a.out; \
38 else \ 38 else \
39 rm -f lxtemp.c; \ 39 rm -f lxtemp.c; \
40 echo -e "\007" ;\ 40 echo -e "\007" ;\
41 echo ">> Unable to find the Ncurses libraries." ;\ 41 echo ">> Unable to find the Ncurses libraries." ;\
42 echo ">>" ;\ 42 echo ">>" ;\
43 echo ">> You must have Ncurses installed in order" ;\ 43 echo ">> You must have Ncurses installed in order" ;\
44 echo ">> to use 'make menuconfig'" ;\ 44 echo ">> to use 'make menuconfig'" ;\
45 echo ;\ 45 echo ;\
46 exit 1 ;\ 46 exit 1 ;\
47 fi 47 fi
48 48
49clean: 49clean:
50 rm -f $(lxdialog-objs) lxdialog 50 rm -f $(lxdialog-objs) lxdialog
51 51
52%.o: %.c 52%.o: %.c
53 $(HOSTCC) $(HOST_EXTRACFLAGS) -fPIC -c $^ -o $@ 53 $(HOSTCC) $(HOST_EXTRACFLAGS) -fPIC -c $^ -o $@
54 54
55lxdialog: $(lxdialog-objs) 55lxdialog: $(lxdialog-objs)
56 $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) $^ -o $@ 56 $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) $^ -o $@