use module names, not file names, in menuselect
[asterisk/asterisk.git] / build_tools / Makefile
1 MENUSELECT_OBJS=menuselect.o menuselect_curses.o
2 MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -DMENUSELECT -I../ -I../include/
3 MENUSELECT_LIBS=../mxml/libmxml.a
4
5 ifeq ($(OSARCH),SunOS)
6   MENUSELECT_OBJS+=../strcompat.o
7 endif
8
9 ifneq ($(NCURSES_LIB),)
10   MENUSELECT_LIBS+=$(NCURSES_LIB)
11   MENUSELECT_INCLUDE=$(NCURSES_INCLUDE)
12 else
13   MENUSELECT_LIBS+=$(CURSES_LIB)
14   MENUSELECT_INCLUDE=$(CURSES_INCLUDE)
15 endif
16
17 menuselect: $(MENUSELECT_OBJS)
18         $(CC) -g -o $@ $(MENUSELECT_OBJS) $(MENUSELECT_LIBS)
19
20 menuselect.o: menuselect.c menuselect.h
21         $(CC) -o $@ $(MENUSELECT_CFLAGS) $<
22
23 menuselect_curses.o: menuselect_curses.c menuselect.h
24         $(CC) -o $@ $(MENUSELECT_CFLAGS) $(MENUSELECT_INCLUDE) $<
25
26 clean:
27         rm -f menuselect *.o
28
29 dist-clean: clean
30         rm -f menuselect-deps