* better
[mascara-docs.git] / i386 / linux-2.3.21 / scripts / lxdialog / Makefile
blob2bad7a12fee1a570f9100ede028ab029d94e350f
1 CC = $(HOSTCC)
2 CPP = $(HOSTCC) -E
4 CFLAGS = $(HOSTCFLAGS) -DLOCALE
5 LDFLAGS = -s -L .
6 LDLIBS = -lncurses
8 ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
9 CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
10 else
11 ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
12 CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
13 else
14 ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
15 CFLAGS += -DCURSES_LOC="<ncurses.h>"
16 else
17 CFLAGS += -DCURSES_LOC="<curses.h>"
18 endif
19 endif
20 endif
23 OBJS = checklist.o menubox.o textbox.o yesno.o inputbox.o \
24 util.o lxdialog.o msgbox.o
25 SRCS = $(OBJS:.o=.c)
28 all: ncurses lxdialog
30 lxdialog: $(OBJS)
32 ncurses:
33 @echo "main() {}" > lxtemp.c
34 @if $(CC) -lncurses lxtemp.c ; then \
35 rm -f lxtemp.c a.out; \
36 else \
37 rm -f lxtemp.c; \
38 echo -e "\007" ;\
39 echo ">> Unable to find the Ncurses libraries." ;\
40 echo ">>" ;\
41 echo ">> You must have Ncurses installed in order" ;\
42 echo ">> to use 'make menuconfig'" ;\
43 echo ;\
44 exit 1 ;\
47 clean:
48 rm -f core *.o *~ lxdialog