X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=600a1d3aa62ce73b7652b1e3e6b0a9a970987b93;hb=2f73c14c11377887630c696cefd035a21e976e09;hp=0a3b1feceda1d5b34b2b37e9101984b66a7fb757;hpb=581335b095ed820978d4c88f026abf462128eeb0;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index 0a3b1fec..600a1d3a 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,16 @@ # default stuff goes here, so that config can override TARGET ?= pcsx -CFLAGS += -Wall -ggdb -Iinclude -ffast-math -ifndef DEBUG +CFLAGS += -Wall -Iinclude -ffast-math +ifeq ($(DEBUG), 1) +CFLAGS += -O0 -ggdb +else +ifeq ($(platform), vita) +CFLAGS += -O3 -DNDEBUG +else CFLAGS += -O2 -DNDEBUG endif +endif CXXFLAGS += $(CFLAGS) #DRC_DBG = 1 #PCNT = 1 @@ -194,6 +200,7 @@ endif ifeq "$(PLATFORM)" "libretro" OBJS += frontend/libretro.o CFLAGS += -DFRONTEND_SUPPORTS_RGB565 +CFLAGS += -DHAVE_LIBRETRO ifeq ($(MMAP_WIN32),1) OBJS += libpcsxcore/memmap_win32.o @@ -246,11 +253,19 @@ frontend/revision.h: FORCE %.o: %.S $(CC_AS) $(CFLAGS) -c $^ -o $@ +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c -o $@ $< + + target_: $(TARGET) $(TARGET): $(OBJS) +ifeq ($(STATIC_LINKING), 1) + $(AR) rcs $@ $(OBJS) +else $(CC_LINK) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS) +endif clean: $(PLAT_CLEAN) clean_plugins $(RM) $(TARGET) $(OBJS) $(TARGET).map frontend/revision.h