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