1998-04-22 12:58:34 +00:00
|
|
|
# Makefile for the BIRD Internet Routing Daemon
|
|
|
|
# (c) 1998 Martin Mares <mj@ucw.cz>
|
|
|
|
|
|
|
|
THISDIR=$(shell pwd)
|
|
|
|
RELDIR=$(subst $(TOPDIR)/,,$(THISDIR))
|
1998-05-15 07:56:13 +00:00
|
|
|
ONAME=$(subst /,_,$(RELDIR)).o
|
|
|
|
|
|
|
|
ifndef SRCS
|
1998-04-28 14:39:34 +00:00
|
|
|
SRCS=$(subst .o,.c,$(OBJS))
|
1998-05-15 07:56:13 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef OBJS
|
1998-04-22 12:58:34 +00:00
|
|
|
|
1998-05-15 07:56:13 +00:00
|
|
|
ifdef LIB
|
1998-04-22 12:58:34 +00:00
|
|
|
|
1998-05-15 07:56:13 +00:00
|
|
|
all: $(LIB)
|
1998-04-28 14:39:34 +00:00
|
|
|
|
1998-05-15 07:56:13 +00:00
|
|
|
$(LIB): $(OBJS)
|
|
|
|
rm -f $(LIB)
|
|
|
|
ar rcs $(LIB) $(OBJS)
|
|
|
|
ranlib $(LIB)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
all: $(ONAME)
|
|
|
|
|
|
|
|
$(ONAME): $(OBJS)
|
|
|
|
$(LD) -r -o $(ONAME) $(OBJS)
|
|
|
|
|
|
|
|
endif
|
1998-04-28 14:39:34 +00:00
|
|
|
|
|
|
|
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
|