Makefile 696 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. CC=gcc
  2. CFLAGS+= -Wall -std=c99 -D_XOPEN_SOURCE=500
  3. INCLUDE=-Iinclude -Iext/xxHash -Iext/openldap/libraries/liblmdb
  4. LIB=-luuid -lpthread
  5. SRC=ext/xxHash/xxhash.c ext/openldap/libraries/liblmdb/mdb.c \
  6. ext/openldap/libraries/liblmdb/midl.c src/*.c
  7. .PHONY: build test lint profile
  8. default: test
  9. build:
  10. $(CC) \
  11. $(CFLAGS) -Werror
  12. $(INCLUDE) \
  13. $(LIB) \
  14. $(SRC) \
  15. -o bin/lsup_rdf.so
  16. lint:
  17. splint \
  18. $(INCLUDE) -Itest \
  19. -DUINT_MAX=0xFFFFFFFFUL \
  20. -nullpass \
  21. -posix-lib \
  22. test.c
  23. test:
  24. $(CC) \
  25. $(CFLAGS) -g3 -DDEBUG \
  26. $(INCLUDE) -Itest \
  27. $(LIB) \
  28. $(SRC) test.c \
  29. -o bin/test
  30. profile:
  31. $(CC) \
  32. $(CFLAGS)
  33. $(INCLUDE) \
  34. $(LIB) \
  35. $(SRC) profile.c \
  36. -o bin/profile