diff options
author | HampusM <hampus@hampusmat.com> | 2021-12-13 17:12:49 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-12-13 17:12:49 +0100 |
commit | a41b799c68923c63547f7ee2d2bbbd9176824622 (patch) | |
tree | 217847217c0091717d25a3f1ff5833614a4a8035 /Makefile | |
parent | 46015c068caaf2c15b450cf8eec3bb3a527aba42 (diff) |
build: add makefile debug target & cflags
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2,11 +2,17 @@ TARGET=mazerator SRCS=$(TARGET).c stack.c CC=gcc CFLAGS=-Wall +CFLAGS_DEBUG=-fdiagnostics-color=always -g all: $(TARGET) $(TARGET): $(TARGET).c - $(CC) $(CFLAGS) $(SRCS) -o $(TARGET) + $(CC) $(CFLAGS) -O2 $(SRCS) -o $(TARGET) + +.PHONY: debug clean + +debug: $(TARGET).c + $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCS) -o $(TARGET) clean: $(RM) $(TARGET) |