various menuselect fixes as a result of boredom during a 9 hour flight and
[asterisk/asterisk.git] / build_tools / Makefile
1 MENUSELECT_OBJS=menuselect.o menuselect_curses.o
2 MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -I../ -I../include/
3 MENUSELECT_LIBS=../mxml/libmxml.a
4
5 ifneq ($(NCURSES_LIB),)
6   MENUSELECT_LIBS+=$(NCURSES_LIB)
7   MENUSELECT_INCLUDE=$(NCURSES_INCLUDE)
8 else
9   MENUSELECT_LIBS+=$(CURSES_LIB)
10   MENUSELECT_INCLUDE=$(CURSES_INCLUDE)
11 endif
12
13 menuselect: $(MENUSELECT_OBJS)
14         $(CC) -g -o $@ ../strcompat.o $(MENUSELECT_OBJS) $(MENUSELECT_LIBS)
15
16 menuselect.o: menuselect.c menuselect.h
17         $(CC) -o $@ $(MENUSELECT_CFLAGS) $<
18
19 menuselect_curses.o: menuselect_curses.c menuselect.h
20         $(CC) -o $@ $(MENUSELECT_CFLAGS) $(MENUSELECT_INCLUDE) $<
21
22 clean:
23         rm -f menuselect *.o
24
25 dist-clean: clean
26         rm -f menuselect-deps