* Added 'debug' make target.
authorUrban Wallasch <urban.wallasch@freenet.de>
Sun, 6 Jun 2021 13:14:15 +0000 (15:14 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Sun, 6 Jun 2021 13:14:15 +0000 (15:14 +0200)
Makefile

index f5fedc05909cdb5d0bcd527c040fb74c3cc1515d..468119d858acff31f1ba5e4c175d286e01843664 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,13 +18,16 @@ LIBS    := -lpthread $(shell pkg-config --libs GraphicsMagickWand)
 STRIP   := strip
 RM      := rm -f
 
-.PHONY: all clean
+.PHONY: all debug clean
 
 all: $(BIN)
+       $(STRIP) $(BIN)
+
+debug: CFLAGS += -g -DDEBUG
+debug: $(BIN)
 
 $(BIN): $(OBJ) $(SELF)
        $(LD) $(LDFLAGS) $(OBJ) $(LIBS) -o $(BIN)
-       $(STRIP) $(BIN)
 
 %.o: %.c $(SELF)
        $(CC) -c $(CFLAGS) -o $*.o $*.c