Makefile 498 B

12345678910111213141516171819202122
  1. CC = gcc
  2. CFLAGS = $(shell grep '^CFLAGS = ' crypt_blowfish/Makefile | cut -d= -f2-)
  3. .PHONY: crypt_blowfish
  4. all: bcrypt.a
  5. test: bcrypt.c crypt_blowfish
  6. $(CC) $(CFLAGS) -DTEST_BCRYPT -c bcrypt.c
  7. $(CC) -o bcrypt_test bcrypt.o crypt_blowfish/*.o
  8. bcrypt.a: bcrypt.o crypt_blowfish
  9. ar r bcrypt.a bcrypt.o crypt_blowfish/*.o
  10. bcrypt.o: bcrypt.c
  11. $(CC) $(CFLAGS) -c bcrypt.c
  12. crypt_blowfish:
  13. $(MAKE) -C crypt_blowfish
  14. clean:
  15. rm -f *.o bcrypt_test bcrypt.a *~ core
  16. $(MAKE) -C crypt_blowfish clean