X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=dc4e07da9a9f881d2661761149ec598acf2d73f0;hb=8356146f0b98c811a0e254b3f35c7e7dc653efce;hp=b23d33e30a2c4a976e4ef9aae8d30eb165d9d2ec;hpb=4e9adec1930817da2031fd044dc74c0f454a0079;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index b23d33e3..dc4e07da 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,10 @@ # 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 CFLAGS += -O2 -DNDEBUG endif CXXFLAGS += $(CFLAGS) @@ -195,6 +197,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 @@ -247,11 +250,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