2009-12-05 20:14:08 +01:00
|
|
|
TESTS=test-base64 test-milenage
|
2009-12-05 19:43:07 +01:00
|
|
|
|
|
|
|
all: $(TESTS)
|
|
|
|
|
|
|
|
ifndef CC
|
|
|
|
CC=gcc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef LDO
|
|
|
|
LDO=$(CC)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CFLAGS
|
|
|
|
CFLAGS = -MMD -O2 -Wall -g
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += -I../src
|
2009-12-05 20:14:08 +01:00
|
|
|
CFLAGS += -I../src/utils
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2009-12-05 20:39:41 +01:00
|
|
|
LIBS = ../src/utils/libutils.a
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2009-12-05 20:39:41 +01:00
|
|
|
../src/utils/libutils.a:
|
|
|
|
$(MAKE) -C ../src/utils
|
2009-12-05 20:14:08 +01:00
|
|
|
|
|
|
|
BASE64_OBJS=test-base64.o \
|
2009-12-05 20:39:41 +01:00
|
|
|
$(LIBS)
|
2009-12-05 19:43:07 +01:00
|
|
|
|
|
|
|
test-base64: $(BASE64_OBJS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $(BASE64_OBJS)
|
|
|
|
|
2009-12-05 20:14:08 +01:00
|
|
|
|
|
|
|
MILENAGE_OBJS=test-milenage.o \
|
|
|
|
../src/crypto/aes-internal.o \
|
|
|
|
../src/crypto/aes-internal-enc.o \
|
|
|
|
../src/crypto/aes-encblock.o \
|
|
|
|
../src/crypto/milenage.o \
|
2009-12-05 20:39:41 +01:00
|
|
|
$(LIBS)
|
2009-12-05 20:14:08 +01:00
|
|
|
|
|
|
|
test-milenage: $(MILENAGE_OBJS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $(MILENAGE_OBJS)
|
|
|
|
|
|
|
|
|
|
|
|
run-tests: $(TESTS)
|
|
|
|
./test-milenage
|
|
|
|
|
2009-12-05 19:43:07 +01:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C ../src clean
|
2009-12-05 19:44:12 +01:00
|
|
|
rm -f $(TESTS) *~ *.o *.d
|
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|