Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 1 | lxdialog-hostcflags += -DLOCALE |
| 2 | lxdialog-libs = -lncurses |
| 3 | |
| 4 | ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) |
| 5 | lxdialog-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 | lxdialog-hostcflags += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" |
| 9 | else |
| 10 | ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) |
| 11 | lxdialog-hostcflags += -DCURSES_LOC="<ncurses.h>" |
| 12 | else |
| 13 | lxdialog-hostcflags += -DCURSES_LOC="<curses.h>" |
| 14 | endif |
| 15 | endif |
| 16 | endif |
| 17 | |
| 18 | $(tmp_config)lxdialog-ncurses: |
| 19 | @mkdir -p $(lxdialog-objtree) |
| 20 | @( \ |
| 21 | cd $(lxdialog-objtree) && \ |
| 22 | echo "main() {}" > lxtemp.c && \ |
| 23 | if $(HOSTCC) -lncurses lxtemp.c ; then \ |
| 24 | rm -f lxtemp.c a.out && \ |
| 25 | mkdir -p $(@D) && \ |
| 26 | touch $@; \ |
| 27 | else \ |
| 28 | rm -f lxtemp.c; \ |
| 29 | echo -e "\007" ;\ |
| 30 | echo ">> Unable to find the Ncurses libraries." ;\ |
| 31 | echo ">>" ;\ |
| 32 | echo ">> You must have Ncurses installed in order" ;\ |
| 33 | echo ">> to use 'make menuconfig'" ;\ |
| 34 | echo ;\ |
| 35 | exit 1 ;\ |
| 36 | fi ; \ |
| 37 | ) |
| 38 | |
| 39 | lxdialog-objs := $(lxdialog-objtree)checklist.o $(lxdialog-objtree)menubox.o \ |
| 40 | $(lxdialog-objtree)textbox.o $(lxdialog-objtree)yesno.o \ |
| 41 | $(lxdialog-objtree)inputbox.o $(lxdialog-objtree)util.o \ |
| 42 | $(lxdialog-objtree)lxdialog.o $(lxdialog-objtree)msgbox.o |
| 43 | |
| 44 | $(lxdialog-objtree)checklist.o: $(lxdialog-srctree)checklist.c $(tmp_config)lxdialog-ncurses |
| 45 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 46 | |
| 47 | $(lxdialog-objtree)menubox.o: $(lxdialog-srctree)menubox.c $(tmp_config)lxdialog-ncurses |
| 48 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 49 | |
| 50 | $(lxdialog-objtree)textbox.o: $(lxdialog-srctree)textbox.c $(tmp_config)lxdialog-ncurses |
| 51 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 52 | |
| 53 | $(lxdialog-objtree)yesno.o: $(lxdialog-srctree)yesno.c $(tmp_config)lxdialog-ncurses |
| 54 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 55 | |
| 56 | $(lxdialog-objtree)inputbox.o: $(lxdialog-srctree)inputbox.c $(tmp_config)lxdialog-ncurses |
| 57 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 58 | |
| 59 | $(lxdialog-objtree)util.o: $(lxdialog-srctree)util.c $(tmp_config)lxdialog-ncurses |
| 60 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 61 | |
| 62 | $(lxdialog-objtree)lxdialog.o: $(lxdialog-srctree)lxdialog.c $(tmp_config)lxdialog-ncurses |
| 63 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 64 | |
| 65 | $(lxdialog-objtree)msgbox.o: $(lxdialog-srctree)msgbox.c $(tmp_config)lxdialog-ncurses |
| 66 | $(HOSTCC) $(HOSTCFLAGS) $(lxdialog-hostcflags) -c -o $@ $< |
| 67 | |
| 68 | $(lxdialog-objtree)lxdialog: $(lxdialog-objs) |
| 69 | $(HOSTCC) -o $@ $(lxdialog-objs) $(lxdialog-libs) |
| 70 | |
| 71 | MRPROPER += $(lxdialog-objtree)lxdialog |