blob: 78a631680133109e4dfaac78e2258a32694d6c38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# ===========================================================================
# Makefile for the various kconfig executables:
# conf: Used for defconfig, oldconfig and related targets
# mconf: Used for the mconfig target.
# Utilizes the lxdialog package
# qconf: Used for the xconfig target
# Based on QT which needs to be installed to compile it
# gconf: Used for the gconfig target
# Based on GTK which needs to be installed to compile it
# object files used by all kconfig flavours
ifndef CURSES_LOC
CURSES_LOC := <ncurses.h>
endif
CPPFLAGS += \
-DCURSES_LOC="$(CURSES_LOC)" \
-DKBUILD_NO_NLS \
-DPACKAGE='"ptxdist"' \
-DCONFIG_='"PTXCONF_"'
ifndef MCONF_LIBS
MCONF_LIBS := -lncurses
endif
conf-libs := $(CONF_LIBS)
mconf-libs := $(MCONF_LIBS)
nconf-libs := -lncurses -lmenu -lpanel
lkc-deps := lkc.h lkc_defs.h expr.h
lxdialog-objs := \
lxdialog/checklist.o \
lxdialog/inputbox.o \
lxdialog/menubox.o \
lxdialog/textbox.o \
lxdialog/util.o \
lxdialog/yesno.o \
conf-objs := \
conf.o \
zconf.tab.o
mconf-objs := \
mconf.o \
zconf.tab.o \
$(lxdialog-objs)
nconf-objs := \
nconf.o \
zconf.tab.o \
nconf.gui.o
conf: $(conf-objs)
$(CC) $^ $(LDFLAGS) -o $@ $(conf-libs)
mconf: $(mconf-objs)
$(CC) $^ $(LDFLAGS) -o $@ $(mconf-libs)
nconf: $(nconf-objs)
$(CC) $^ $(LDFLAGS) -o $@ $(nconf-libs)
%.moc: %.h
$(MOC) -i $< -o $@
%.o: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
%.o: %.cc
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
%.moc: %.h
$(KC_QT_MOC) -i $< -o $@
lkc_defs.h: lkc_proto.h
sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
zconf.tab.o: zconf.lex.c zconf.hash.c zconf.tab.c confdata.c expr.c symbol.c menu.c $(lkc-deps)
kconfig_load.o: $(lkc-deps)
qconf.o: qconf.moc $(lkc-deps)
gconf.o: $(lkc-deps)
###
# The following requires flex/bison/gperf
# By default we use the _shipped versions, uncomment the following line if
# you are modifying the flex/bison src.
# LKC_GENPARSER := 1
ifdef LKC_GENPARSER
zconf.tab.c: zconf.y
lex.zconf.c: zconf.l
zconf.hash.c: zconf.gperf
%.tab.c: %.y
bison -l -b $* -p $(notdir $*) $<
cp $@ $@_shipped
%.lex.c: %.l
flex -L -P$(notdir $*) -o$@ $<
cp $@ $@_shipped
%.hash.c: %.gperf
gperf < $< > $@
cp $@ $@_shipped
else
%.tab.c: %.y
cp $@_shipped $@
%.lex.c: %.l
cp $@_shipped $@
%.hash.c: %.gperf
cp $@_shipped $@
endif
clean:
rm -f $(conf-objs) $(mconf-objs) $(nconf-objs) conf mconf nconf gconf qconf
rm -f lkc_defs.h zconf.tab.o zconf.tab.c zconf.hash.c zconf.lex.c
|