Makefile 991 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. CC = gcc
  2. CFLAGS := -lz
  3. CFLAGS += -Wall -fanalyzer
  4. OBJECTS = src/rewise.o \
  5. src/CP1252.o \
  6. src/print.o \
  7. src/reader.o \
  8. src/exefile.o \
  9. src/pkzip.o \
  10. src/wildcard.o \
  11. src/wisescript.o \
  12. src/wiseoverlay.o
  13. all: rewise
  14. rewise: $(OBJECTS)
  15. $(CC) -o $@ -I./src $(CFLAGS) $^
  16. debug: CFLAGS += -g -DREWISE_DEBUG
  17. debug: rewise
  18. # This builds REWise normal (no debug build) but unknown arguments
  19. # like --debug will be allowed. This to make running tests easier
  20. # between normal and debug build.
  21. debug-dummy: CFLAGS += -DREWISE_DEBUG_DUMMY
  22. debug-dummy: rewise
  23. clean:
  24. rm -f src/*.o rewise
  25. # Make sure header files are evaluated against changes
  26. $(OBJECTS): src/CP1252.h \
  27. src/print.h \
  28. src/reader.h \
  29. src/exefile.h \
  30. src/pkzip.h \
  31. src/wisescript.h \
  32. src/wiseoverlay.h \
  33. src/version.h \
  34. src/errors.h \
  35. src/wildcard.h
  36. .PHONY: all debug debug-dummy clean