X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=ca8ccf6e29a50384897feb8ede3915f56604df0e;hb=75bf03886e4acb87bd7922d42d828f56c5dbe4bb;hp=7a4e1301c7529b44f9d798006d59d565c8017469;hpb=5cd97263ce3d2fe446fa2d5856c4401326094714;p=picodrive.git diff --git a/Makefile b/Makefile index 7a4e130..ca8ccf6 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,31 @@ TARGET ?= PicoDrive -CFLAGS += -Wall -ggdb -falign-functions=2 +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 +ifeq ($(WANT_GDB),1) +CFLAGS += ggdb -falign-functions=2 +endif all: config.mak target_