notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add option to display internal FPS
[pcsx_rearmed.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
9f8b777
..
83f7799
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,18
+1,24
@@
# Makefile for PCSX ReARMed
# default stuff goes here, so that config can override
# Makefile for PCSX ReARMed
# default stuff goes here, so that config can override
-TARGET = pcsx
-CFLAGS += -Wall -ggdb -Iinclude -ffast-math
-LDLIBS += -lpthread
-ifndef DEBUG
+TARGET ?= pcsx
+CFLAGS += -Wall -Iinclude -ffast-math
+ifeq ($(DEBUG), 1)
+CFLAGS += -O0 -ggdb
+else
+ifeq ($(platform), vita)
+CFLAGS += -O3 -DNDEBUG
+else
CFLAGS += -O2 -DNDEBUG
endif
CFLAGS += -O2 -DNDEBUG
endif
+endif
CXXFLAGS += $(CFLAGS)
#DRC_DBG = 1
#PCNT = 1
all: config.mak target_ plugins_
CXXFLAGS += $(CFLAGS)
#DRC_DBG = 1
#PCNT = 1
all: config.mak target_ plugins_
+ifndef NO_CONFIG_MAK
ifneq ($(wildcard config.mak),)
config.mak: ./configure
@echo $@ is out-of-date, running configure
ifneq ($(wildcard config.mak),)
config.mak: ./configure
@echo $@ is out-of-date, running configure
@@
-23,10
+29,16
@@
config.mak:
@echo "Please run ./configure before running make!"
@exit 1
endif
@echo "Please run ./configure before running make!"
@exit 1
endif
+else # NO_CONFIG_MAK
+config.mak:
+endif
+
-include Makefile.local
-include Makefile.local
-CC_LINK = $(CC)
+CC_LINK ?= $(CC)
+CC_AS ?= $(CC)
LDFLAGS += $(MAIN_LDFLAGS)
LDFLAGS += $(MAIN_LDFLAGS)
+EXTRA_LDFLAGS ?= -Wl,-Map=$@.map
LDLIBS += $(MAIN_LDLIBS)
ifdef PCNT
CFLAGS += -DPCNT
LDLIBS += $(MAIN_LDLIBS)
ifdef PCNT
CFLAGS += -DPCNT
@@
-40,6
+52,23
@@
OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore
libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \
libpcsxcore/sio.o libpcsxcore/socket.o libpcsxcore/spu.o
OBJS += libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o
libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \
libpcsxcore/sio.o libpcsxcore/socket.o libpcsxcore/spu.o
OBJS += libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o
+ifeq ($(WANT_ZLIB),1)
+CFLAGS += -Ideps/zlib
+OBJS += deps/zlib/adler32.o \
+ deps/zlib/compress.o \
+ deps/zlib/crc32.o \
+ deps/zlib/deflate.o \
+ deps/zlib/gzclose.o \
+ deps/zlib/gzlib.o \
+ deps/zlib/gzread.o \
+ deps/zlib/gzwrite.o \
+ deps/zlib/inffast.o \
+ deps/zlib/inflate.o \
+ deps/zlib/inftrees.o \
+ deps/zlib/trees.o \
+ deps/zlib/uncompr.o \
+ deps/zlib/zutil.o
+endif
ifeq "$(ARCH)" "arm"
OBJS += libpcsxcore/gte_arm.o
endif
ifeq "$(ARCH)" "arm"
OBJS += libpcsxcore/gte_arm.o
endif
@@
-50,21
+79,23
@@
libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
# dynarec
ifeq "$(USE_DYNAREC)" "1"
# 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
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
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
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
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
endif
# spu
@@
-76,6
+107,11
@@
plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \
ifeq "$(ARCH)" "arm"
OBJS += plugins/dfsound/arm_utils.o
endif
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
ifneq ($(findstring oss,$(SOUND_DRIVERS)),)
plugins/dfsound/out.o: CFLAGS += -DHAVE_OSS
OBJS += plugins/dfsound/oss.o
@@
-158,6
+194,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
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
USE_PLUGIN_LIB = 1
USE_FRONTEND = 1
endif
@@
-171,13
+208,22
@@
USE_PLUGIN_LIB = 1
USE_FRONTEND = 1
endif
ifeq "$(PLATFORM)" "maemo"
USE_FRONTEND = 1
endif
ifeq "$(PLATFORM)" "maemo"
-OBJS += maemo/hildon.o maemo/main.o
+OBJS += maemo/hildon.o maemo/main.o
maemo/maemo_xkb.o frontend/pl_gun_ts.o
maemo/%.o: maemo/%.c
USE_PLUGIN_LIB = 1
maemo/%.o: maemo/%.c
USE_PLUGIN_LIB = 1
+LDFLAGS += $(shell pkg-config --libs hildon-1 libpulse)
+CFLAGS += $(shell pkg-config --cflags hildon-1) -DHAVE_TSLIB
+CFLAGS += `pkg-config --cflags glib-2.0 libosso dbus-1 hildon-fm-2`
+LDFLAGS += `pkg-config --libs glib-2.0 libosso dbus-1 hildon-fm-2`
endif
ifeq "$(PLATFORM)" "libretro"
OBJS += frontend/libretro.o
CFLAGS += -DFRONTEND_SUPPORTS_RGB565
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"
endif
ifeq "$(USE_PLUGIN_LIB)" "1"
@@
-224,13
+270,24
@@
frontend/revision.h: FORCE
@rm $@_
%.o: %.S
@rm $@_
%.o: %.S
- $(CC) $(CFLAGS) -c $^ -o $@
+ $(CC_AS) $(CFLAGS) -c $^ -o $@
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c -o $@ $<
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
target_: $(TARGET)
$(TARGET): $(OBJS)
target_: $(TARGET)
$(TARGET): $(OBJS)
- $(CC_LINK) -o $@ $^ $(LDFLAGS) $(LDLIBS) -Wl,-Map=$@.map
+ @echo "** BUILDING $(TARGET) FOR PLATFORM $(PLATFORM) **"
+ifeq ($(STATIC_LINKING), 1)
+ $(AR) rcs $@ $(OBJS)
+else
+ $(CC_LINK) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS)
+endif
+ @echo "** BUILD SUCCESSFUL! GG NO RE **"
clean: $(PLAT_CLEAN) clean_plugins
$(RM) $(TARGET) $(OBJS) $(TARGET).map frontend/revision.h
clean: $(PLAT_CLEAN) clean_plugins
$(RM) $(TARGET) $(OBJS) $(TARGET).map frontend/revision.h
@@
-272,7
+329,7
@@
endif
ifeq "$(PLATFORM)" "pandora"
PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh
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
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