menu: implement savestates and scaling cfg
[pcsx_rearmed.git] / Makefile
... / ...
CommitLineData
1#CROSS_COMPILE=
2AS = $(CROSS_COMPILE)as
3CC = $(CROSS_COMPILE)gcc
4LD = $(CROSS_COMPILE)ld
5
6CFLAGS += -ggdb -Ifrontend
7LDFLAGS += -lz -lpthread -ldl -lpng
8ifdef CROSS_COMPILE
9CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -ffast-math
10ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
11endif
12ifndef DEBUG
13CFLAGS += -O2 # -DNDEBUG
14endif
15#DRC_DBG = 1
16#PCNT = 1
17TARGET = pcsx
18
19all: $(TARGET)
20
21# core
22OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/debug.o \
23 libpcsxcore/decode_xa.o libpcsxcore/disr3000a.o libpcsxcore/gte.o libpcsxcore/mdec.o \
24 libpcsxcore/misc.o libpcsxcore/plugins.o libpcsxcore/ppf.o libpcsxcore/psxbios.o \
25 libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o \
26 libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \
27 libpcsxcore/sio.o libpcsxcore/socket.o libpcsxcore/spu.o
28# dynarec
29ifndef NO_NEW_DRC
30OBJS += libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/linkage_arm.o
31endif
32OBJS += libpcsxcore/new_dynarec/emu_if.o
33libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm.c
34ifdef DRC_DBG
35libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64
36CFLAGS += -DDRC_DBG
37endif
38
39# spu
40OBJS += plugins/dfsound/adsr.o plugins/dfsound/dma.o plugins/dfsound/oss.o plugins/dfsound/reverb.o \
41 plugins/dfsound/xa.o plugins/dfsound/freeze.o plugins/dfsound/cfg.o plugins/dfsound/registers.o \
42 plugins/dfsound/spu.o
43# gpu
44OBJS += plugins/dfxvideo/cfg.o plugins/dfxvideo/fps.o plugins/dfxvideo/key.o plugins/dfxvideo/prim.o \
45 plugins/dfxvideo/gpu.o plugins/dfxvideo/menu.o plugins/dfxvideo/soft.o plugins/dfxvideo/zn.o
46ifdef X11
47LDFLAGS += -lX11 -lXv
48OBJS += plugins/dfxvideo/draw.o
49else
50CFLAGS += -D_MACGL # disables X in dfxvideo
51OBJS += plugins/dfxvideo/draw_fb.o
52endif
53
54# gui
55OBJS += gui/Config.o gui/Plugin.o
56
57OBJS += frontend/main.o frontend/plugin.o frontend/plugin_lib.o
58OBJS += frontend/menu.o
59OBJS += frontend/linux/fbdev.o frontend/linux/in_evdev.o
60OBJS += frontend/linux/plat.o frontend/linux/oshide.o
61OBJS += frontend/common/fonts.o frontend/common/input.o frontend/common/readpng.o
62ifdef CROSS_COMPILE
63OBJS += frontend/arm_utils.o
64OBJS += frontend/plat_omap.o
65else
66OBJS += frontend/plat_dummy.o
67endif
68ifdef PCNT
69CFLAGS += -DPCNT
70endif
71frontend/%.o: CFLAGS += -Wall -DIN_EVDEV
72frontend/menu.o: frontend/revision.h
73
74frontend/revision.h: FORCE
75 @(git describe || echo) | sed -e 's/.*/#define REV "\0"/' > $@_
76 @diff -q $@_ $@ > /dev/null 2>&1 || cp $@_ $@
77 @rm $@_
78.PHONY: FORCE
79
80
81$(TARGET): $(OBJS)
82 $(CC) -o $@ $^ $(LDFLAGS) -Wl,-Map=$@.map
83
84spunull.so: plugins/spunull/spunull.c
85 $(CC) $(CFLAGS) -shared -fPIC -o $@ $^
86
87clean:
88 $(RM) $(TARGET) $(OBJS)
89