add the 'clean', 'clean-depend', and 'dist-clean' targets as .PHONY targets
[asterisk/asterisk.git] / build_tools / Makefile
index 0825cd6..9d54b01 100644 (file)
@@ -1,7 +1,13 @@
-MENUSELECT_OBJS=menuselect.o menuselect_curses.o ../strcompat.o
-MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -I../ -I../include/
+.PHONY: clean dist-clean
+
+MENUSELECT_OBJS=menuselect.o menuselect_curses.o
+MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -DMENUSELECT -I../ -I../include/
 MENUSELECT_LIBS=../mxml/libmxml.a
 
+ifeq ($(OSARCH),SunOS)
+  MENUSELECT_OBJS+=../strcompat.o
+endif
+
 ifneq ($(NCURSES_LIB),)
   MENUSELECT_LIBS+=$(NCURSES_LIB)
   MENUSELECT_INCLUDE=$(NCURSES_INCLUDE)
@@ -11,13 +17,13 @@ else
 endif
 
 menuselect: $(MENUSELECT_OBJS)
-       $(CC) -g -o $@ $(MENUSELECT_OBJS) $(MENUSELECT_LIBS)
+       $(CC) -g -Wall -o $@ $(MENUSELECT_OBJS) $(MENUSELECT_LIBS)
 
 menuselect.o: menuselect.c menuselect.h
-       $(CC) -o $@ $(MENUSELECT_CFLAGS) $<
+       $(CC) -Wall -o $@ $(MENUSELECT_CFLAGS) $<
 
 menuselect_curses.o: menuselect_curses.c menuselect.h
-       $(CC) -o $@ $(MENUSELECT_CFLAGS) $(MENUSELECT_INCLUDE) $<
+       $(CC) -Wall -o $@ $(MENUSELECT_CFLAGS) $(MENUSELECT_INCLUDE) $<
 
 clean:
        rm -f menuselect *.o