~ubuntu-branches/ubuntu/lucid/skyeye/lucid

« back to all changes in this revision

Viewing changes to utils/conf/scripts/lxdialog/makefile.lx

  • Committer: Bazaar Package Importer
  • Author(s): Yu Guanghui
  • Date: 2006-08-09 16:30:44 UTC
  • Revision ID: james.westby@ubuntu.com-20060809163044-6efqjm0t2stau23w
Tags: upstream-1.2.0rc8
ImportĀ upstreamĀ versionĀ 1.2.0rc8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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