mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
make subdirs always build as appropriate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
12
Makefile
12
Makefile
@@ -155,7 +155,7 @@ all: depend asterisk subdirs
|
|||||||
editline/config.h:
|
editline/config.h:
|
||||||
cd editline && unset CFLAGS LIBS && ./configure ; \
|
cd editline && unset CFLAGS LIBS && ./configure ; \
|
||||||
|
|
||||||
editline/libedit.a: editline/config.h
|
editline/libedit.a:
|
||||||
$(MAKE) -C editline libedit.a
|
$(MAKE) -C editline libedit.a
|
||||||
|
|
||||||
db1-ast/libdb1.a:
|
db1-ast/libdb1.a:
|
||||||
@@ -194,16 +194,16 @@ build.h:
|
|||||||
./make_build_h
|
./make_build_h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
stdtime/localtime.o:
|
stdtime/libtime.a:
|
||||||
@if [ -d stdtime ]; then \
|
@if [ -d stdtime ]; then \
|
||||||
$(MAKE) -C stdtime; \
|
$(MAKE) -C stdtime libtime.a ; \
|
||||||
else \
|
else \
|
||||||
echo "You need to do a cvs update -d not just cvs update"; \
|
echo "You need to do a cvs update -d not just cvs update"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/localtime.o $(OBJS)
|
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/localtime.o
|
$(CC) $(DEBUG) -o asterisk -Wl,-E $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
|
||||||
|
|
||||||
subdirs:
|
subdirs:
|
||||||
for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
|
for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done
|
||||||
@@ -412,6 +412,6 @@ valgrind: dont-optimize
|
|||||||
depend: .depend
|
depend: .depend
|
||||||
for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
|
for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
|
||||||
|
|
||||||
.depend: build.h
|
.depend:
|
||||||
./mkdep ${CFLAGS} `ls *.c`
|
./mkdep ${CFLAGS} `ls *.c`
|
||||||
|
|
||||||
|
@@ -1,19 +1,26 @@
|
|||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
#CFLAGS=-Wall
|
#CFLAGS=-Wall
|
||||||
INCLUDE=-I../include
|
INCLUDE=-I../include
|
||||||
|
|
||||||
all: localtime.o
|
OBJS=localtime.o
|
||||||
|
|
||||||
clean::
|
all: libtime.a
|
||||||
rm -f localtime.o test
|
|
||||||
|
|
||||||
depend::
|
libtime.a: $(OBJS)
|
||||||
@echo "Nothing to do for depend"
|
ar rv $@ $(OBJS)
|
||||||
|
ranlib $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f libtime.a *.o test
|
||||||
|
|
||||||
|
depend: .depend
|
||||||
|
|
||||||
|
.depend:
|
||||||
|
../mkdep $(CFLAGS) *.c
|
||||||
|
|
||||||
test: test.c
|
test: test.c
|
||||||
${CC} ${CFLAGS} -o test test.c
|
${CC} ${CFLAGS} -o test test.c
|
||||||
|
|
||||||
localtime.o: localtime.c
|
ifneq ($(wildcard .depend),)
|
||||||
|
include .depend
|
||||||
|
endif
|
||||||
|
Reference in New Issue
Block a user