From 25697773b529d80278679978b7416ca9c87e15e9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 15 May 1998 07:56:13 +0000 Subject: 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. --- Rules | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'Rules') diff --git a/Rules b/Rules index a0a1418a..2d9c0a8a 100644 --- a/Rules +++ b/Rules @@ -3,16 +3,31 @@ THISDIR=$(shell pwd) RELDIR=$(subst $(TOPDIR)/,,$(THISDIR)) -ANAME=$(subst /,_,$(RELDIR)).a +ONAME=$(subst /,_,$(RELDIR)).o + +ifndef SRCS SRCS=$(subst .o,.c,$(OBJS)) +endif + +ifdef OBJS -all: $(ANAME) +ifdef LIB -$(ANAME): $(OBJS) - rm -f $(ANAME) - ar rcs $(ANAME) $(OBJS) +all: $(LIB) -ifdef OBJS +$(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 -- cgit v1.2.3