-
Notifications
You must be signed in to change notification settings - Fork 106
/
Makefile
50 lines (44 loc) · 1.01 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
NAME = glorytun
VERSION != ./version.sh
DIST = $(NAME)-$(VERSION)
CC = cc
CFLAGS = -std=c99 -O2 -Wall -fstack-protector-strong
CPPFLAGS = -I.sodium/$(X)build/src/libsodium/include
LDFLAGS = -L.sodium/$(X)build/src/libsodium/.libs
LDLIBS = -lsodium
prefix = /usr/local
PREFIX = $(prefix)
$(NAME):
$(X)$(CC) $(EXTRA) \
$(CFLAGS) \
$(CPPFLAGS) \
$(LDFLAGS) \
-DPACKAGE_NAME=\"$(NAME)\" \
-DPACKAGE_VERSION=\"$(VERSION)\" \
argz/argz.c \
mud/aegis256/aegis256.c \
mud/mud.c \
src/argz.c \
src/bench.c \
src/bind.c \
src/common.c \
src/ctl.c \
src/iface.c \
src/keygen.c \
src/list.c \
src/main.c \
src/path.c \
src/set.c \
src/show.c \
src/tun.c \
src/version.c \
-o $(NAME) \
$(LDLIBS)
install: $(NAME)
mkdir -p $(DESTDIR)$(PREFIX)/bin
mv -f $(NAME) $(DESTDIR)$(PREFIX)/bin
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME)
clean:
rm -f $(NAME)
.PHONY: $(NAME) install uninstall clean