X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=2a6be72bdd0c626ba022e0a5ef72e8f19dd12618;hb=6c5b8733e0b286d5a4b4d9b7899e4c17a92cd04a;hp=cc19e774ccdffe0c70df58f00076b789293d9bbd;hpb=4bfc6b97e6eef32b184403362b49f4aa919b2dcf;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index cc19e774..2a6be72b 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 @@ -56,22 +62,23 @@ libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull # dynarec ifeq "$(USE_DYNAREC)" "1" -OBJS += libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/linkage_arm.o -OBJS += libpcsxcore/new_dynarec/pcsxmem.o +OBJS += libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/arm/linkage_arm.o +OBJS += libpcsxcore/new_dynarec/backends/psx/pcsxmem.o else -libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -DDRC_DISABLE +libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -DDRC_DISABLE frontend/libretro.o: CFLAGS += -DDRC_DISABLE endif -OBJS += libpcsxcore/new_dynarec/emu_if.o -libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm.c \ - libpcsxcore/new_dynarec/pcsxmem_inline.c -libpcsxcore/new_dynarec/new_dynarec.o: CFLAGS += -Wno-all -Wno-pointer-sign +OBJS += libpcsxcore/new_dynarec/backends/psx/emu_if.o +libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/arm/assem_arm.c \ + libpcsxcore/new_dynarec/backends/psx/pcsxmem_inline.c ifdef DRC_DBG -libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64 +libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -DDRC_DBG endif ifeq "$(DRC_CACHE_BASE)" "1" libpcsxcore/new_dynarec/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 +libpcsxcore/new_dynarec/backends/psx/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 +libpcsxcore/new_dynarec/arm/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 endif # spu @@ -83,6 +90,11 @@ plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \ ifeq "$(ARCH)" "arm" OBJS += plugins/dfsound/arm_utils.o endif +ifeq "$(HAVE_C64_TOOLS)" "1" +plugins/dfsound/spu.o: CFLAGS += -DC64X_DSP +plugins/dfsound/spu.o: plugins/dfsound/spu_c64x.c +frontend/menu.o: CFLAGS += -DC64X_DSP +endif ifneq ($(findstring oss,$(SOUND_DRIVERS)),) plugins/dfsound/out.o: CFLAGS += -DHAVE_OSS OBJS += plugins/dfsound/oss.o @@ -165,6 +177,7 @@ OBJS += frontend/libpicofe/linux/fbdev.o frontend/libpicofe/linux/xenv.o OBJS += frontend/libpicofe/linux/in_evdev.o OBJS += frontend/plat_pandora.o frontend/plat_omap.o frontend/main.o frontend/menu.o: CFLAGS += -include frontend/pandora/ui_feat.h +frontend/libpicofe/linux/plat.o: CFLAGS += -DPANDORA USE_PLUGIN_LIB = 1 USE_FRONTEND = 1 endif @@ -189,6 +202,11 @@ endif ifeq "$(PLATFORM)" "libretro" OBJS += frontend/libretro.o CFLAGS += -DFRONTEND_SUPPORTS_RGB565 +CFLAGS += -DHAVE_LIBRETRO + +ifeq ($(MMAP_WIN32),1) +OBJS += libpcsxcore/memmap_win32.o +endif endif ifeq "$(USE_PLUGIN_LIB)" "1" @@ -237,11 +255,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 @@ -283,7 +309,7 @@ endif ifeq "$(PLATFORM)" "pandora" PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh -rel: pcsx $(PLUGINS) \ +rel: pcsx plugins/dfsound/pcsxr_spu_area3.out $(PLUGINS) \ frontend/pandora/pcsx.sh frontend/pandora/pcsx.pxml.templ frontend/pandora/pcsx.png \ frontend/pandora/picorestore frontend/pandora/skin readme.txt COPYING rm -rf out