summaryrefslogtreecommitdiff
path: root/scripts/lxdialog/Makefile
Unidiff
Diffstat (limited to 'scripts/lxdialog/Makefile') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/lxdialog/Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/scripts/lxdialog/Makefile b/scripts/lxdialog/Makefile
new file mode 100644
index 0000000..75b7bac
--- a/dev/null
+++ b/scripts/lxdialog/Makefile
@@ -0,0 +1,44 @@
1HOST_CFLAGS := -DLOCALE
2HOST_LDFLAGS := -lncurses
3
4ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
5 HOST_CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
6else
7ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
8 HOST_CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
9else
10ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
11 HOST_CFLAGS += -DCURSES_LOC="<ncurses.h>"
12else
13 HOST_CFLAGS += -DCURSES_LOC="<curses.h>"
14endif
15endif
16endif
17
18host-progs := lxdialog
19
20lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
21 util.o lxdialog.o msgbox.o
22
23EXTRA_TARGETS := lxdialog
24
25first_rule: ncurses
26
27include $(TOPDIR)/Rules.make
28
29.PHONY: ncurses
30
31ncurses:
32 @echo "main() {}" > lxtemp.c
33 @if $(HOSTCC) $(HOST_CFLAGS) lxtemp.c $(HOST_LDFLAGS); then \
34 rm -f lxtemp.c a.out; \
35 else \
36 rm -f lxtemp.c; \
37 echo -e "\007" ;\
38 echo ">> Unable to find the Ncurses libraries." ;\
39 echo ">>" ;\
40 echo ">> You must have Ncurses installed in order" ;\
41 echo ">> to use 'make menuconfig'" ;\
42 echo ;\
43 exit 1 ;\
44 fi