mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Changed #include <x/y> to #include "x/y" for our local includes, so that
gcc -MM can be used to separate them from the system ones. Added automatic generation of dependencies.
This commit is contained in:
17
Rules
17
Rules
@@ -4,9 +4,26 @@
|
||||
THISDIR=$(shell pwd)
|
||||
RELDIR=$(subst $(TOPDIR)/,,$(THISDIR))
|
||||
ANAME=$(subst /,_,$(RELDIR)).a
|
||||
SRCS=$(subst .o,.c,$(OBJS))
|
||||
|
||||
all: $(ANAME)
|
||||
|
||||
$(ANAME): $(OBJS)
|
||||
rm -f $(ANAME)
|
||||
ar rcs $(ANAME) $(OBJS)
|
||||
|
||||
ifdef OBJS
|
||||
|
||||
dep: $(SRCS)
|
||||
rm -f .depend
|
||||
for a in $(SRCS) ; do gcc $(CPPFLAGS) -MM $$a >>.depend ; done
|
||||
|
||||
else
|
||||
|
||||
dep:
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard .depend),)
|
||||
include .depend
|
||||
endif
|
||||
|
Reference in New Issue
Block a user