This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
forked from annastropha/ncsu-wolfssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.murl
43 lines (31 loc) · 1.85 KB
/
Makefile.murl
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
CC = gcc
CFLAGS+=-g -DUSE_MURL -O0 -fPIC -Wall
LDFLAGS+=-Lmurl
INCDIRS+=-I. -Isrc
SOURCES=src/acvp.c src/acvp_aes.c src/acvp_des.c src/acvp_hash.c src/acvp_drbg.c src/acvp_transport.c src/acvp_util.c src/parson.c src/acvp_hmac.c src/acvp_cmac.c src/acvp_rsa.c src/acvp_dsa.c src/acvp_kdf135_tls.c src/acvp_kdf135_snmp.c src/acvp_kdf135_ssh.c
OBJECTS=$(SOURCES:.c=.o)
all: libacvp.a wolf_app
.PHONY: test testcpp
libacvp.a: $(OBJECTS)
ar rcs libacvp.a $(OBJECTS)
.c.o:
$(CC) $(INCDIRS) $(CFLAGS) -c $< -o $@
libacvp.so: $(OBJECTS)
$(CC) $(INCDIRS) $(CFLAGS) -shared -Wl,-soname,libacvp.so.1.0.0 -o libacvp.so.1.0.0 $(OBJECTS)
ln -fs libacvp.so.1.0.0 libacvp.so
acvp_app: app/app_main.c libacvp.a
$(CC) $(INCDIRS) $(CFLAGS) -o $@ app/app_main.c -L. $(LDFLAGS) -lacvp -lcrypto -lssl -lmurl -ldl
wolf_app: app/app_main_wolf.c libacvp.a
$(CC) $(INCDIRS) $(CFLAGS) -o $@ app/app_main_wolf.c app/app_func_wolf.c -L. $(LDFLAGS) -lacvp -lcrypto -lmurl -ldl -lwolfssl
tests: wolf_app_unit_tests
wolf_app_unit_tests: app/tests/wolf_app/wolf_app_tests.c app/tests/wolf_app/wolf_app_tests_sha.c app/tests/wolf_app/wolf_app_tests_main.c libacvp.a
$(CC) -Wl,--wrap=acvp_create_test_session,--wrap=acvp_set_server,--wrap=acvp_set_vendor_info,--wrap=acvp_set_module_info,--wrap=acvp_set_path_segment,--wrap=acvp_set_cacerts,--wrap=acvp_set_certkey,--wrap=acvp_enable_hash_cap,--wrap=acvp_register,--wrap=acvp_process_tests,--wrap=acvp_check_test_results,--wrap=acvp_free_test_session,--wrap=acvp_cleanup $(INCDIRS) $(CFLAGS) -o $@ app/tests/wolf_app/wolf_app_tests_main.c app/tests/wolf_app/wolf_app_tests_sha.c app/tests/wolf_app/wolf_app_tests.c app/app_func_wolf.c -L. $(LDFLAGS) -lacvp -lcrypto -lssl -lmurl -ldl -lwolfssl -lcmocka
clean:
rm -f *.[ao]
rm -f src/*.[ao]
rm -f app/*.[ao]
rm -f libacvp.so.1.0.0
rm -f acvp_app
rm -f wolf_app
rm -f wolf_app_unit_tests
rm -f testgcm