-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.in
107 lines (76 loc) · 2.44 KB
/
Makefile.in
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#
# Makefile for hawkc
#
CC=@CC@
AR=ar
.SUFFIXES : .o .c
.c.o:
$(CC) $(CFLAGS) -I hawkc -o $*.o -c $<
CFLAGS= -std=c99 -pedantic -O2 -Wall -Ihawkc
LIBOPT=-lm -lcrypto
LIBOBJS=\
hawkc/base64url.o \
hawkc/base64.o \
hawkc/common.o \
hawkc/parser.o \
hawkc/crypto_openssl.o \
hawkc/authorization.o \
hawkc/www_authenticate.o \
OBJS=\
hawk/hawk.o \
LIB=hawkc/libhawkc.a
$(LIB): $(LIBOBJS)
$(AR) rc $(LIB) $(LIBOBJS)
HAWK=hawk/hawk
$(HAWK): $(OBJS) $(LIB)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIB) $(LIBOPT)
TESTOBJ=\
test/test_parser.o \
test/test_signing.o \
test/test_base64url.o \
test/test_base64.o \
test/test_crypto.o \
test/test_authorization_header_parse.o \
test/test_www_authenticate_header.o
$(TEST): $(TO) $(LIB)
$(CC) $(CFLAGS) -Itest -o $@ $(TO) $(LIB) $(LIBOPT)
buildtest: $(LIB) $(TESTOBJ)
$(CC) $(CFLAGS) -Itest -o test/test_parser test/test_parser.o $(LIB) $(LIBOPT)
$(CC) $(CFLAGS) -Itest -o test/test_signing test/test_signing.o $(LIB) $(LIBOPT)
$(CC) $(CFLAGS) -Itest -o test/test_base64url test/test_base64url.o $(LIB) $(LIBOPT)
$(CC) $(CFLAGS) -Itest -o test/test_base64 test/test_base64.o $(LIB) $(LIBOPT)
$(CC) $(CFLAGS) -Itest -o test/test_crypto test/test_crypto.o $(LIB) $(LIBOPT)
$(CC) $(CFLAGS) -Itest -o test/test_authorization_header_parse test/test_authorization_header_parse.o $(LIB) $(LIBOPT)
$(CC) $(CFLAGS) -Itest -o test/test_www_authenticate_header test/test_www_authenticate_header.o $(LIB) $(LIBOPT)
test: buildtest
test/test_parser
test/test_signing
test/test_base64url
test/test_base64
test/test_crypto
test/test_authorization_header_parse
test/test_www_authenticate_header
cleantest:
rm -f test/test_parser; rm -f test/test_parser.o
rm -f test/test_signing; rm -f test/test_signing.o
rm -f test/test_base64url; rm -f test/test_base64url.o
rm -f test/test_base64; rm -f test/test_base64.o
rm -f test/test_crypto; rm -f test/test_crypto.o
rm -f test/test_authorization_header_parse; rm -f test/test_authorization_header_parse.o
rm -f test/test_www_authenticate_header; rm -f test/test_www_authenticate_header.o
all: $(LIB) $(HAWK)
install: all
cp hawkc/hawkc.h /usr/local/include
cp hawkc/libhawkc.a /usr/local/lib
cp hawk/hawk /usr/local/bin
clean: cleantest
rm -f core; \
rm -f gmon.out; \
rm -f $(OBJS); \
rm -f $(LIBOBJS); \
rm -f $(LIB); \
rm -f $(HAWK); \
distclean: clean
rm -f config.h;
rm -f config.status config.cache config.log Makefile;
rm -rf autom4te.cache