1 HOSTCFLAGS += -DLOCALE
2 LIBS = -lncurses
3
4 ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
5 HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
6 else
7 ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
8 HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
9 else
10 ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
11 HOSTCFLAGS += -DCURSES_LOC="<ncurses.h>"
12 else
13 HOSTCFLAGS += -DCURSES_LOC="<curses.h>"
14 endif
15 endif
16 endif
17
18
19 OBJS = checklist.o menubox.o textbox.o yesno.o inputbox.o \
20 util.o lxdialog.o msgbox.o
21
22 %.o: %.c
23 $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
24
25 all: ncurses lxdialog
26
27 lxdialog: $(OBJS)
28 $(HOSTCC) -o lxdialog $(OBJS) $(LIBS)
29
30 ncurses:
31 @echo "main() {}" > lxtemp.c
32 @if $(HOSTCC) -lncurses lxtemp.c ; then \
33 rm -f lxtemp.c a.out; \
34 else \
35 rm -f lxtemp.c; \
36 echo -e "\007" ;\
37 echo ">> Unable to find the Ncurses libraries." ;\
38 echo ">>" ;\
39 echo ">> You must have Ncurses installed in order" ;\
40 echo ">> to use 'make menuconfig'" ;\
41 echo ;\
42 exit 1 ;\
43 fi
44
45 clean:
46 rm -f core *.o *~ lxdialog
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.