mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
1feea03e74
gcc -MM can be used to separate them from the system ones. Added automatic generation of dependencies.
30 lines
455 B
Plaintext
30 lines
455 B
Plaintext
# Makefile for the BIRD Internet Routing Daemon
|
|
# (c) 1998 Martin Mares <mj@ucw.cz>
|
|
|
|
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
|