mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
The library is now glued together from generic and OS-dependent parts
by the `mergedirs' script. Few more IP address manipulation functions and some fixes.
This commit is contained in:
29
Rules
29
Rules
@@ -3,17 +3,32 @@
|
||||
|
||||
THISDIR=$(shell pwd)
|
||||
RELDIR=$(subst $(TOPDIR)/,,$(THISDIR))
|
||||
ANAME=$(subst /,_,$(RELDIR)).a
|
||||
ONAME=$(subst /,_,$(RELDIR)).o
|
||||
|
||||
ifndef SRCS
|
||||
SRCS=$(subst .o,.c,$(OBJS))
|
||||
|
||||
all: $(ANAME)
|
||||
|
||||
$(ANAME): $(OBJS)
|
||||
rm -f $(ANAME)
|
||||
ar rcs $(ANAME) $(OBJS)
|
||||
endif
|
||||
|
||||
ifdef OBJS
|
||||
|
||||
ifdef LIB
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
$(LIB): $(OBJS)
|
||||
rm -f $(LIB)
|
||||
ar rcs $(LIB) $(OBJS)
|
||||
ranlib $(LIB)
|
||||
|
||||
else
|
||||
|
||||
all: $(ONAME)
|
||||
|
||||
$(ONAME): $(OBJS)
|
||||
$(LD) -r -o $(ONAME) $(OBJS)
|
||||
|
||||
endif
|
||||
|
||||
dep: $(SRCS)
|
||||
rm -f .depend
|
||||
for a in $(SRCS) ; do gcc $(CPPFLAGS) -MM $$a >>.depend ; done
|
||||
|
Reference in New Issue
Block a user