From f04796ec8bb32cdc46a2752fd6b20bff42e79c9d Mon Sep 17 00:00:00 2001 From: Marcel Hellkamp Date: Thu, 29 Mar 2018 15:24:17 +0200 Subject: [PATCH] Build with -O2 by default and -g with `make debug` --- pixelnuke/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pixelnuke/Makefile b/pixelnuke/Makefile index b784d54..ee8dcd1 100644 --- a/pixelnuke/Makefile +++ b/pixelnuke/Makefile @@ -1,13 +1,16 @@ .PHONY: default all clean CC = gcc -CFLAGS = -Wall -pthread -g +CFLAGS = -Wall -pthread -O2 LIBS = -levent -levent_pthreads -lrt -lGL -lGLEW -lglfw TARGET = pixelnuke default: $(TARGET) all: default +debug: CFLAGS += -DDEBUG -g +debug: default + OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) HEADERS = $(wildcard *.h)