forked from jech/babeld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (37 loc) · 1.36 KB
/
Makefile
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
PREFIX = /usr/local
MANDIR = $(PREFIX)/share/man
CDEBUGFLAGS = -Os -g -Wall
DEFINES = $(PLATFORM_DEFINES)
CFLAGS = $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES)
LDLIBS = -lrt
SRCS = babeld.c net.c kernel.c util.c interface.c source.c neighbour.c \
route.c xroute.c message.c resend.c configuration.c local.c \
hmac.c rfc6234/sha224-256.c BLAKE2/ref/blake2s-ref.c
OBJS = babeld.o net.o kernel.o util.o interface.o source.o neighbour.o \
route.o xroute.o message.o resend.o configuration.o local.o \
hmac.o rfc6234/sha224-256.o BLAKE2/ref/blake2s-ref.o
babeld: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o babeld $(OBJS) $(LDLIBS)
babeld.o: babeld.c version.h
local.o: local.c version.h
kernel.o: kernel_netlink.c kernel_socket.c
version.h:
./generate-version.sh > version.h
.SUFFIXES: .man .html
.man.html:
mandoc -Thtml $< > $@
babeld.html: babeld.man
.PHONY: all install install.minimal uninstall clean
all: babeld babeld.man
install.minimal: babeld
-rm -f $(TARGET)$(PREFIX)/bin/babeld
mkdir -p $(TARGET)$(PREFIX)/bin
cp -f babeld $(TARGET)$(PREFIX)/bin
install: install.minimal all
mkdir -p $(TARGET)$(MANDIR)/man8
cp -f babeld.man $(TARGET)$(MANDIR)/man8/babeld.8
uninstall:
-rm -f $(TARGET)$(PREFIX)/bin/babeld
-rm -f $(TARGET)$(MANDIR)/man8/babeld.8
clean:
-rm -f babeld babeld.html version.h *.o */*.o */*/*.o *~ core TAGS gmon.out