aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f90b64e..34cc3b3 100644
--- a/Makefile
+++ b/Makefile
@@ -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)