X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=ca8ccf6e29a50384897feb8ede3915f56604df0e;hb=4981de9ce79d0aa80222f8583667bf2fbf2265f2;hp=eb5dc0a0347ebd0e5d3f361be61c7da19dce7ced;hpb=d6a897aa61fb13b435a7bc8798c7f7c78db1930c;p=picodrive.git diff --git a/Makefile b/Makefile index eb5dc0a..ca8ccf6 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,32 @@ TARGET ?= PicoDrive +DEBUG = 0 CFLAGS += -Wall CFLAGS += -I. -DINLINE=inline -ifndef DEBUG -CFLAGS += -O2 -DNDEBUG -ffunction-sections -ifneq ($(APPLE),1) -LDFLAGS += -Wl,--gc-sections + +ifeq ($(DEBUG),1) + CFLAGS += -g -O0 +else + ifeq ($(platform), vita) + CFLAGS += -O3 -DNDEBUG + else + CFLAGS += -O2 -DNDEBUG -ffunction-sections + endif endif + +ifneq ($(APPLE),1) + LDFLAGS += -Wl,--gc-sections endif + #CFLAGS += -DEVT_LOG #CFLAGS += -DDRC_CMP #cpu_cmp = 1 #drc_debug = 7 #profile = 1 -ifneq ($(platform),emscripten) +ifeq ($(WANT_GDB),1) CFLAGS += ggdb -falign-functions=2 endif - all: config.mak target_ ifndef NO_CONFIG_MAK