Makefile 753 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. TESTS=test-base64 test-milenage
  2. all: $(TESTS)
  3. ifndef CC
  4. CC=gcc
  5. endif
  6. ifndef LDO
  7. LDO=$(CC)
  8. endif
  9. ifndef CFLAGS
  10. CFLAGS = -MMD -O2 -Wall -g
  11. endif
  12. CFLAGS += -I../src
  13. CFLAGS += -I../src/utils
  14. LIBS = ../src/utils/libutils.a
  15. ../src/utils/libutils.a:
  16. $(MAKE) -C ../src/utils
  17. BASE64_OBJS=test-base64.o \
  18. $(LIBS)
  19. test-base64: $(BASE64_OBJS)
  20. $(LDO) $(LDFLAGS) -o $@ $(BASE64_OBJS)
  21. MILENAGE_OBJS=test-milenage.o \
  22. ../src/crypto/aes-internal.o \
  23. ../src/crypto/aes-internal-enc.o \
  24. ../src/crypto/aes-encblock.o \
  25. ../src/crypto/milenage.o \
  26. $(LIBS)
  27. test-milenage: $(MILENAGE_OBJS)
  28. $(LDO) $(LDFLAGS) -o $@ $(MILENAGE_OBJS)
  29. run-tests: $(TESTS)
  30. ./test-milenage
  31. clean:
  32. $(MAKE) -C ../src clean
  33. rm -f $(TESTS) *~ *.o *.d
  34. -include $(OBJS:%.o=%.d)