From: orbea Date: Tue, 6 Dec 2016 08:02:23 +0000 (-0800) Subject: Check if DEBUG is set rather than not set. X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a7781cd376dce2640a12e707fe7b9ea7fde8681;p=picodrive.git Check if DEBUG is set rather than not set. --- diff --git a/Makefile b/Makefile index a62d9b1..ca8ccf6 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,21 @@ TARGET ?= PicoDrive DEBUG = 0 CFLAGS += -Wall CFLAGS += -I. -DINLINE=inline -ifeq ($(DEBUG),0) -ifeq ($(platform), vita) -CFLAGS += -O3 -DNDEBUG -else -CFLAGS += -O2 -DNDEBUG -ffunction-sections -endif + +ifeq ($(DEBUG),1) + CFLAGS += -g -O0 else -CFLAGS += -g -O2 + ifeq ($(platform), vita) + CFLAGS += -O3 -DNDEBUG + else + CFLAGS += -O2 -DNDEBUG -ffunction-sections + endif endif + ifneq ($(APPLE),1) -LDFLAGS += -Wl,--gc-sections + LDFLAGS += -Wl,--gc-sections endif + #CFLAGS += -DEVT_LOG #CFLAGS += -DDRC_CMP #cpu_cmp = 1 @@ -24,7 +27,6 @@ ifeq ($(WANT_GDB),1) CFLAGS += ggdb -falign-functions=2 endif - all: config.mak target_ ifndef NO_CONFIG_MAK