Merge slimey's Solaris compatibility (with small mods) (bug #2740)
[asterisk/asterisk.git] / stdtime / Makefile
index fede065..ccc11ed 100755 (executable)
@@ -1,19 +1,24 @@
+OBJS=localtime.o
 
-CC=gcc
-#CFLAGS=-Wall
-INCLUDE=-I../include
+all: libtime.a
 
-all: localtime.o
+libtime.a: $(OBJS)
+       ar rv $@ $(OBJS)
+       ranlib $@
 
-clean::
-       rm -f localtime.o test
+install:
 
-depend::
-       @echo "Nothing to do for depend"
+clean:
+       rm -f libtime.a *.o test .depend
 
-test: test.c
-       ${CC} ${CFLAGS} -o test test.c
+depend: .depend
 
-localtime.o: localtime.c
+.depend:
+       ../mkdep $(CFLAGS) *.c
 
+test: test.c
+       ${CC} ${CFLAGS} -o test test.c
 
+ifneq ($(wildcard .depend),)
+include .depend
+endif