Statistics
| Branch: | Revision:

iof-bird-daemon / Rules @ 25697773

History | View | Annotate | Download (569 Bytes)

1
# Makefile for the BIRD Internet Routing Daemon
2
# (c) 1998 Martin Mares <mj@ucw.cz>
3

    
4
THISDIR=$(shell pwd)
5
RELDIR=$(subst $(TOPDIR)/,,$(THISDIR))
6
ONAME=$(subst /,_,$(RELDIR)).o
7

    
8
ifndef SRCS
9
SRCS=$(subst .o,.c,$(OBJS))
10
endif
11

    
12
ifdef OBJS
13

    
14
ifdef LIB
15

    
16
all: $(LIB)
17

    
18
$(LIB): $(OBJS)
19
	rm -f $(LIB)
20
	ar rcs $(LIB) $(OBJS)
21
	ranlib $(LIB)
22

    
23
else
24

    
25
all: $(ONAME)
26

    
27
$(ONAME): $(OBJS)
28
	$(LD) -r -o $(ONAME) $(OBJS)
29

    
30
endif
31

    
32
dep: $(SRCS)
33
	rm -f .depend
34
	for a in $(SRCS) ; do gcc $(CPPFLAGS) -MM $$a >>.depend ; done
35

    
36
else
37

    
38
dep:
39

    
40
endif
41

    
42
ifneq ($(wildcard .depend),)
43
include .depend
44
endif