summaryrefslogtreecommitdiffstats
path: root/Rules
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-05-15 09:56:13 +0200
committerMartin Mares <mj@ucw.cz>1998-05-15 09:56:13 +0200
commit25697773b529d80278679978b7416ca9c87e15e9 (patch)
tree8ca875571e57475a15e978abae76aeda58d82149 /Rules
parent62aa008abd627c6862310daf65ffd337a920bdbb (diff)
downloadbird-25697773b529d80278679978b7416ca9c87e15e9.tar
bird-25697773b529d80278679978b7416ca9c87e15e9.zip
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.
Diffstat (limited to 'Rules')
-rw-r--r--Rules27
1 files changed, 21 insertions, 6 deletions
diff --git a/Rules b/Rules
index a0a1418..2d9c0a8 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