aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile
blob: eb5b0eee84eeedf78b669fe3c8a5b46100468022 (plain)
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
TESTS=test-base64 test-milenage

all: $(TESTS)

ifndef CC
CC=gcc
endif

ifndef LDO
LDO=$(CC)
endif

ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif

CFLAGS += -I../src
CFLAGS += -I../src/utils

LIBS = ../src/utils/libutils.a \
	../src/crypto/libcrypto.a

../src/utils/libutils.a:
	$(MAKE) -C ../src/utils

../src/crypto/libcrypto.a:
	$(MAKE) -C ../src/crypto

BASE64_OBJS=test-base64.o \
	$(LIBS)

test-base64: $(BASE64_OBJS)
	$(LDO) $(LDFLAGS) -o $@ $(BASE64_OBJS)


MILENAGE_OBJS=test-milenage.o \
	$(LIBS)

test-milenage: $(MILENAGE_OBJS)
	$(LDO) $(LDFLAGS) -o $@ $(MILENAGE_OBJS)


run-tests: $(TESTS)
	./test-milenage

clean:
	$(MAKE) -C ../src clean
	rm -f $(TESTS) *~ *.o *.d

-include $(OBJS:%.o=%.d)