2009-12-05 15:11:50 -05:00
|
|
|
TESTS=test-base64 test-md4 test-milenage
|
2009-12-05 13:43:07 -05: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 14:14:08 -05:00
|
|
|
CFLAGS += -I../src/utils
|
2009-12-05 13:43:07 -05:00
|
|
|
|
2009-12-05 15:03:46 -05:00
|
|
|
LIBS = ../src/utils/libutils.a \
|
|
|
|
../src/crypto/libcrypto.a
|
2009-12-05 13:43:07 -05:00
|
|
|
|
2009-12-05 14:39:41 -05:00
|
|
|
../src/utils/libutils.a:
|
|
|
|
$(MAKE) -C ../src/utils
|
2009-12-05 14:14:08 -05:00
|
|
|
|
2009-12-05 15:03:46 -05:00
|
|
|
../src/crypto/libcrypto.a:
|
|
|
|
$(MAKE) -C ../src/crypto
|
|
|
|
|
2009-12-05 13:43:07 -05:00
|
|
|
|
2009-12-05 15:14:55 -05:00
|
|
|
test-base64: test-base64.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
2009-12-05 13:43:07 -05:00
|
|
|
|
2009-12-05 15:11:50 -05:00
|
|
|
test-md4: test-md4.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
2009-12-05 14:14:08 -05:00
|
|
|
|
2009-12-05 15:14:55 -05:00
|
|
|
test-milenage: test-milenage.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
2009-12-05 14:14:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
run-tests: $(TESTS)
|
2009-12-05 15:11:50 -05:00
|
|
|
./test-md4
|
2009-12-05 14:14:08 -05:00
|
|
|
./test-milenage
|
|
|
|
|
2009-12-05 13:43:07 -05:00
|
|
|
clean:
|
|
|
|
$(MAKE) -C ../src clean
|
2009-12-05 13:44:12 -05:00
|
|
|
rm -f $(TESTS) *~ *.o *.d
|
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|