File: Rules.in

package info (click to toggle)
bird 1.4.5-1+deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 4,284 kB
  • ctags: 5,123
  • sloc: ansic: 35,995; sh: 3,215; perl: 2,083; lex: 677; makefile: 225; xml: 204; sed: 13
file content (89 lines) | stat: -rw-r--r-- 1,666 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Makefile fragments for the BIRD Internet Routing Daemon
# (c) 1999--2000 Martin Mares <mj@ucw.cz>

srcdir=@srcdir_rel_mf@
srcdir_abs := $(shell cd $(srcdir) ; pwd)
objdir=@objdir@
exedir=@exedir@

protocols=@protocols@
static-dirs := nest filter $(addprefix proto/,$(protocols))
static-dir-paths := $(addprefix $(srcdir)/,$(static-dirs))
dynamic-dirs := lib conf
dynamic-dir-paths := $(dynamic-dirs)
client-dirs := client
client-dir-paths := $(client-dirs)
doc-dirs := doc
doc-dir-paths := $(doc-dirs)

all-dirs:=$(static-dirs) $(dynamic-dirs) $(client-dirs) $(doc-dirs)
clean-dirs:=$(all-dirs) proto sysdep

CPPFLAGS=-I$(root-rel) -I$(srcdir) @CPPFLAGS@
CFLAGS=$(CPPFLAGS) @CFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
CLIENT_LIBS=@CLIENT_LIBS@
CC=@CC@
M4=@M4@
BISON=@BISON@
FLEX=@FLEX@
RANLIB=@RANLIB@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@

prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
sysconfdir=@sysconfdir@
localstatedir=@localstatedir@
docdir=@prefix@/doc

ifdef source

objs := $(subst .c,.o,$(source))

ifdef dir-name
src-path := $(srcdir)/$(dir-name)/
endif

all:
	cd $(root-rel) && make

ifdef lib-dest

subdir: $(lib-dest)

$(lib-dest): $(objs)
	rm -f $@
	ar rcs $@ $^
	$(RANLIB) $@

else

subdir: all.o

all.o: $(objs)
#	$(LD) -r -o $@ $^
#	Changed to $(CC) because $(LD) has problems with crosscompiling
	$(CC) $(CFLAGS) -nostdlib -r -o $@ $^

endif

%.o: $(src-path)%.c
	$(CC) $(CFLAGS) -o $@ -c $<

ifndef source-dep
source-dep := $(source)
endif

depend:
	$(CC) $(CPPFLAGS) -MM $(addprefix $(src-path),$(source-dep)) >depend

ifneq ($(wildcard depend),)
include depend
endif

endif