fix dependencies in object dirs
This commit is contained in:
parent
fcb969ef14
commit
a5d38fc897
2 changed files with 15 additions and 3 deletions
|
@ -28,16 +28,18 @@ all: $(OBJS)
|
|||
|
||||
doc: $(SRCS:.c=.doc) $(CPPSRCS.cpp=.doc) $(HDRS:.h=.doc)
|
||||
|
||||
DEPOBJS = $(addprefix $(OBJDIR)/, $(SRCS:.c=.dep)) $(addprefix $(OBJDIR)/, $(CPPSRCS:.cpp=.dep))
|
||||
|
||||
clean::
|
||||
$(RM) $(OBJS) core *.doc
|
||||
|
||||
clobber: clean
|
||||
$(RM) .depend .#* *~ *.$(OE)
|
||||
|
||||
depend::
|
||||
depend:: $(DEPOBJS)
|
||||
@echo -n >.depend
|
||||
@for i in $(SRCS) $(CPPSRCS) ; do\
|
||||
$(CC) -MM $(IFLAGS) $(DFLAGS) $(CFLAGS) $$i >>.depend ; done
|
||||
@for i in $(DEPOBJS) ; do\
|
||||
cat $$i >>.depend ; $(RM) $$i ; done
|
||||
|
||||
tags::
|
||||
for i in $(SRCS) $(CPPSRCS) ; do\
|
||||
|
|
10
setup
10
setup
|
@ -940,6 +940,16 @@ if [ "$DARWIN" = "1" ] ; then
|
|||
fi
|
||||
echo >> $RULESFILE
|
||||
|
||||
echo "\$(OBJDIR)/%.dep: %.c" >> $RULESFILE
|
||||
echo " @echo -n \"\$(OBJDIR)/\" >\$@" >> $RULESFILE
|
||||
echo " @\$(CC) -MM \$(IFLAGS) \$(DFLAGS) \$(CFLAGS) \$< >>\$@" >> $RULESFILE
|
||||
echo >> $RULESFILE
|
||||
|
||||
echo "\$(OBJDIR)/%.dep: %.cpp" >> $RULESFILE
|
||||
echo " @echo -n \"\$(OBJDIR)/\" >\$@" >> $RULESFILE
|
||||
echo " @\$(CC) -MM \$(IFLAGS) \$(DFLAGS) \$(CFLAGS) \$< >>\$@" >> $RULESFILE
|
||||
echo >> $RULESFILE
|
||||
|
||||
#
|
||||
# Source code documentation
|
||||
|
||||
|
|
Loading…
Reference in a new issue