2012-08-07 12:30:13 +02:00
|
|
|
TESTS=test-base64 test-md4 test-md5 test-milenage test-ms_funcs \
|
2013-03-16 17:12:39 +01:00
|
|
|
test-bitfield \
|
2012-08-07 12:30:13 +02:00
|
|
|
test-printf \
|
|
|
|
test-sha1 \
|
2011-11-24 19:54:20 +01:00
|
|
|
test-sha256 test-aes test-asn1 test-x509 test-x509v3 test-list test-rc4
|
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-06 16:18:28 +01:00
|
|
|
SLIBS = ../src/utils/libutils.a
|
|
|
|
|
|
|
|
DLIBS = ../src/crypto/libcrypto.a \
|
2009-12-06 15:45:36 +01:00
|
|
|
../src/tls/libtls.a
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2009-12-06 16:18:28 +01:00
|
|
|
LIBS = $(SLIBS) $(DLIBS)
|
|
|
|
LLIBS = -Wl,--start-group $(DLIBS) -Wl,--end-group $(SLIBS)
|
|
|
|
|
2009-12-05 20:39:41 +01:00
|
|
|
../src/utils/libutils.a:
|
|
|
|
$(MAKE) -C ../src/utils
|
2009-12-05 20:14:08 +01:00
|
|
|
|
2009-12-05 21:03:46 +01:00
|
|
|
../src/crypto/libcrypto.a:
|
|
|
|
$(MAKE) -C ../src/crypto
|
|
|
|
|
2009-12-06 15:45:36 +01:00
|
|
|
../src/tls/libtls.a:
|
|
|
|
$(MAKE) -C ../src/tls
|
|
|
|
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2009-12-05 21:25:32 +01:00
|
|
|
test-aes: test-aes.o $(LIBS)
|
2012-09-08 23:25:54 +02:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
|
2009-12-05 21:25:32 +01:00
|
|
|
|
2009-12-06 15:45:36 +01:00
|
|
|
test-asn1: test-asn1.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2009-12-05 21:14:55 +01:00
|
|
|
test-base64: test-base64.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
2009-12-05 19:43:07 +01:00
|
|
|
|
2013-03-16 17:12:39 +01:00
|
|
|
test-bitfield: test-bitfield.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2011-11-13 09:49:27 +01:00
|
|
|
test-https: test-https.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
2009-12-19 12:43:25 +01:00
|
|
|
test-list: test-list.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2009-12-05 21:11:50 +01:00
|
|
|
test-md4: test-md4.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
2009-12-05 20:14:08 +01:00
|
|
|
|
2009-12-05 21:25:32 +01:00
|
|
|
test-md5: test-md5.o $(LIBS)
|
2013-02-28 15:16:07 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS)
|
2009-12-05 21:25:32 +01:00
|
|
|
|
2009-12-05 21:14:55 +01:00
|
|
|
test-milenage: test-milenage.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
2009-12-05 20:14:08 +01:00
|
|
|
|
2009-12-05 21:25:32 +01:00
|
|
|
test-ms_funcs: test-ms_funcs.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2012-08-07 12:30:13 +02:00
|
|
|
test-printf: test-printf.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2011-11-24 19:54:20 +01:00
|
|
|
test-rc4: test-rc4.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2009-12-05 21:25:32 +01:00
|
|
|
test-sha1: test-sha1.o $(LIBS)
|
2013-02-28 15:16:07 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS)
|
2009-12-05 21:25:32 +01:00
|
|
|
|
|
|
|
test-sha256: test-sha256.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $^
|
|
|
|
|
2009-12-06 15:45:36 +01:00
|
|
|
test-x509: test-x509.o $(LIBS)
|
2009-12-06 16:18:28 +01:00
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
2009-12-06 15:45:36 +01:00
|
|
|
|
2009-12-06 17:10:52 +01:00
|
|
|
test-x509v3: test-x509v3.o $(LIBS)
|
|
|
|
$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
|
|
|
|
|
2009-12-05 20:14:08 +01:00
|
|
|
|
|
|
|
run-tests: $(TESTS)
|
2009-12-05 21:25:32 +01:00
|
|
|
./test-aes
|
2013-03-16 17:12:39 +01:00
|
|
|
./test-bitfield
|
2009-12-19 12:43:25 +01:00
|
|
|
./test-list
|
2009-12-05 21:11:50 +01:00
|
|
|
./test-md4
|
2009-12-05 21:25:32 +01:00
|
|
|
./test-md5
|
2009-12-05 20:14:08 +01:00
|
|
|
./test-milenage
|
2012-08-07 12:30:13 +02:00
|
|
|
./test-printf
|
2009-12-05 21:25:32 +01:00
|
|
|
./test-sha1
|
|
|
|
./test-sha256
|
|
|
|
@echo
|
|
|
|
@echo All tests completed successfully.
|
2009-12-05 20:14:08 +01:00
|
|
|
|
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
|
2012-01-01 18:09:18 +01:00
|
|
|
rm -f test-https
|
2009-12-06 17:10:52 +01:00
|
|
|
rm -f test_x509v3_nist.out.*
|
|
|
|
rm -f test_x509v3_nist2.out.*
|
2009-12-05 19:44:12 +01:00
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|