diff --git a/Makefile b/Makefile
index d15b9fc2ed3d2cdfa0a5330c7eb39f658312256c..b904fa6b917c59d3c91f5f8c5331a8bf2d6a2315 100755
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ all: depend asterisk subdirs
 editline/config.h:
 	cd editline && unset CFLAGS LIBS && ./configure ; \
 
-editline/libedit.a: editline/config.h
+editline/libedit.a:
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a: 
@@ -194,16 +194,16 @@ build.h:
 	./make_build_h
 endif
 
-stdtime/localtime.o:
+stdtime/libtime.a:
 	@if [ -d stdtime ]; then \
-		$(MAKE) -C stdtime; \
+		$(MAKE) -C stdtime libtime.a ; \
 	else \
 		echo "You need to do a cvs update -d not just cvs update"; \
 		exit 1; \
 	fi
 
-asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/localtime.o $(OBJS)
-	$(CC) $(DEBUG) -o asterisk -Wl,-E $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/localtime.o
+asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
+	$(CC) $(DEBUG) -o asterisk -Wl,-E $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
 
 subdirs: 
 	for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
@@ -412,6 +412,6 @@ valgrind: dont-optimize
 depend: .depend
 	for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
 
-.depend: build.h
+.depend:
 	./mkdep ${CFLAGS} `ls *.c`
 
diff --git a/stdtime/Makefile b/stdtime/Makefile
index fede0651e5a89dffc58ae24e0ca39620bfbd198c..927f07dedcbfd22606fd5d58266c3e0eaf18e7b9 100755
--- a/stdtime/Makefile
+++ b/stdtime/Makefile
@@ -1,19 +1,26 @@
-
 CC=gcc
 #CFLAGS=-Wall
 INCLUDE=-I../include
 
-all: localtime.o
+OBJS=localtime.o
 
-clean::
-	rm -f localtime.o test
+all: libtime.a
 
-depend::
-	@echo "Nothing to do for depend"
+libtime.a: $(OBJS)
+	ar rv $@ $(OBJS)
+	ranlib $@
 
-test: test.c
-	${CC} ${CFLAGS} -o test test.c
+clean:
+	rm -f libtime.a *.o test
 
-localtime.o: localtime.c
+depend: .depend
 
+.depend:
+	../mkdep $(CFLAGS) *.c
+
+test: test.c
+	${CC} ${CFLAGS} -o test test.c
 
+ifneq ($(wildcard .depend),)
+include .depend
+endif