X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=2a6be72bdd0c626ba022e0a5ef72e8f19dd12618;hb=9357cf3b9fe9d20527ba61cee5d770a6dd8c3d8d;hp=6187958abf1afd7da7f55135889e7ede3d48657e;hpb=c82d5b4ba31ae828cae27962f1a4d328fd4ea4da;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index 6187958a..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 @@ -107,15 +119,9 @@ endif # builtin gpu OBJS += plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o ifeq "$(BUILTIN_GPU)" "neon" -ifeq "$(HAVE_NEON)" "1" -plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP -plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c OBJS += plugins/gpu_neon/psx_gpu_if.o plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o -else -plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP +plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c -OBJS += plugins/gpu_neon/psx_gpu_if.o -endif endif ifeq "$(BUILTIN_GPU)" "peops" # note: code is not safe for strict-aliasing? (Castlevania problems) @@ -171,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 @@ -195,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" @@ -243,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 @@ -289,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