-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (30 loc) · 942 Bytes
/
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
C_SOURCES = $(wildcard src/*.c)
C_HEADERS = $(wildcard include/*.h)
OBJ = ${C_SOURCES:.c=.o}
EXE = sdw-tpm proxy-p proxy-v
CC = gcc
all: $(EXE) log
test: $(OBJ)
make -C ./test/unit/ all run
make -C ./test/integration/ all run
proxy-v: $(addprefix ./src/, proxy-v.o socket.o crypto.o sysci.o report.o \
tpm2.o log.o verify-response.o)
$(CC) $^ -o $@ -lcrypto -lcjson -ltss2-esys -ltss2-sys -ltss2-tcti-mssim
proxy-p: $(addprefix ./src/, proxy-p.o coordination.o socket.o crypto.o \
sysci.o report.o log.o verify-response.o)
$(CC) $^ -o $@ -lcrypto -lcjson
sdw-tpm: $(addprefix ./src/, sdw-tpm.o util.o crypto.o coordination.o report.o \
sysci.o log.o)
$(CC) $^ -o $@ -lcrypto -lcjson
%.o: %.c $(C_HEADERS)
$(CC) -c $< -o $@ $(C_FLAGS)
log:
mkdir log
.PHONY: clean all test
clean:
rm -rf $(OBJ) $(EXE)
rm -rf ./log/*
rm -rf log
rm -rf ./blacklist.txt
make -C ./test/unit/ clean
make -C ./test/integration/ clean