author | kergoth <kergoth> | 2002-10-31 17:11:35 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-10-31 17:11:35 (UTC) |
commit | d955226c2197578f69c510282a4e9ad1ea8fe771 (patch) (unidiff) | |
tree | 0d8f210dd012559df4e3432ccc8ce96e9bd15853 /scripts/lxdialog/Makefile | |
parent | 16fcb285f9ba7c514fc3f2695768a82feeb7182b (diff) | |
download | opie-d955226c2197578f69c510282a4e9ad1ea8fe771.zip opie-d955226c2197578f69c510282a4e9ad1ea8fe771.tar.gz opie-d955226c2197578f69c510282a4e9ad1ea8fe771.tar.bz2 |
Initial bits to start work on revamping the buildsystem
-rw-r--r-- | scripts/lxdialog/Makefile | 44 |
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 @@ | |||
1 | HOST_CFLAGS := -DLOCALE | ||
2 | HOST_LDFLAGS := -lncurses | ||
3 | |||
4 | ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) | ||
5 | HOST_CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" | ||
6 | else | ||
7 | ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) | ||
8 | HOST_CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" | ||
9 | else | ||
10 | ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) | ||
11 | HOST_CFLAGS += -DCURSES_LOC="<ncurses.h>" | ||
12 | else | ||
13 | HOST_CFLAGS += -DCURSES_LOC="<curses.h>" | ||
14 | endif | ||
15 | endif | ||
16 | endif | ||
17 | |||
18 | host-progs := lxdialog | ||
19 | |||
20 | lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ | ||
21 | util.o lxdialog.o msgbox.o | ||
22 | |||
23 | EXTRA_TARGETS := lxdialog | ||
24 | |||
25 | first_rule: ncurses | ||
26 | |||
27 | include $(TOPDIR)/Rules.make | ||
28 | |||
29 | .PHONY: ncurses | ||
30 | |||
31 | ncurses: | ||
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 | ||