summaryrefslogtreecommitdiff
path: root/Makefile.common
blob: 90dbff02437e3275209a8d2afce3154e966f61a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
ifeq ($(DEBUG), 1)
DEFINES += -O0 -g
else
DEFINES += -O3 -DNDEBUG=1
endif

SOURCES :=
SOURCES += $(CORE_DIR)/apu.cpp
SOURCES += $(CORE_DIR)/apuaux.c
SOURCES += $(CORE_DIR)/c4.cpp
SOURCES += $(CORE_DIR)/c4emu.cpp
SOURCES += $(CORE_DIR)/cheats.cpp
SOURCES += $(CORE_DIR)/cheats2.cpp
SOURCES += $(CORE_DIR)/clip.cpp
SOURCES += $(CORE_DIR)/data.cpp
SOURCES += $(CORE_DIR)/dsp1.cpp
SOURCES += $(CORE_DIR)/fxemu.cpp
SOURCES += $(CORE_DIR)/fxinst.cpp
SOURCES += $(CORE_DIR)/globals.cpp
SOURCES += $(CORE_DIR)/ppu.cpp
SOURCES += $(CORE_DIR)/dma.cpp
SOURCES += $(CORE_DIR)/memmap.cpp
SOURCES += $(CORE_DIR)/cpu.cpp
SOURCES += $(CORE_DIR)/cpuexec.cpp
SOURCES += $(CORE_DIR)/cpuops.cpp
SOURCES += $(CORE_DIR)/sa1.cpp
SOURCES += $(CORE_DIR)/sa1cpu.cpp
SOURCES += $(CORE_DIR)/sdd1.cpp
SOURCES += $(CORE_DIR)/sdd1emu.cpp
SOURCES += $(CORE_DIR)/snapshot.cpp
SOURCES += $(CORE_DIR)/soundux.cpp
SOURCES += $(CORE_DIR)/spc700.cpp
SOURCES += $(CORE_DIR)/srtc.cpp
SOURCES += $(CORE_DIR)/mode7new.cpp
SOURCES += $(CORE_DIR)/mode7.cpp
SOURCES += $(CORE_DIR)/mode7add.cpp
SOURCES += $(CORE_DIR)/mode7add1_2.cpp
SOURCES += $(CORE_DIR)/mode7sub.cpp
SOURCES += $(CORE_DIR)/mode7sub1_2.cpp
SOURCES += $(CORE_DIR)/mode7prio.cpp
SOURCES += $(CORE_DIR)/mode7addprio.cpp
SOURCES += $(CORE_DIR)/mode7add1_2prio.cpp
SOURCES += $(CORE_DIR)/mode7subprio.cpp
SOURCES += $(CORE_DIR)/mode7sub1_2prio.cpp
SOURCES += $(CORE_DIR)/gfx16.cpp
SOURCES += $(CORE_DIR)/rops.cpp
SOURCES += $(LIBRETRO_DIR)/libretro.cpp
SOURCES += $(LIBRETRO_DIR)/memstream.c

ifeq ($(ARM_ASM), 1)
SOURCES += $(CORE_DIR)/spc700a.s \
			  $(CORE_DIR)/spc_decode.S

SOURCES += $(CORE_DIR)/tile16.cpp
SOURCES += $(CORE_DIR)/tile16add.cpp
SOURCES += $(CORE_DIR)/tile16add1_2.cpp
SOURCES += $(CORE_DIR)/tile16fadd1_2.cpp
SOURCES += $(CORE_DIR)/tile16sub.cpp
SOURCES += $(CORE_DIR)/tile16sub1_2.cpp
SOURCES += $(CORE_DIR)/tile16fsub1_2.cpp
else
SOURCES += $(CORE_DIR)/tile_c.cpp
endif

SOURCES += $(CORE_DIR)/os9x_65c816_global.s
SOURCES += $(CORE_DIR)/os9x_65c816_spcasm.s
SOURCES += $(CORE_DIR)/os9x_65c816_spcc.s

#SOURCES += $(CORE_DIR)/os9x_65c816.s

SOURCES += $(CORE_DIR)/os9x_asm_cpu.cpp

#DEFINES += -D__GP2X__
#DEFINES += -DASMCPU
#DEFINES += -DVAR_CYCLES
#DEFINES += -D_C_GW_
#DEFINES += -DUSE_SA1
# -DFAST_LSB_WORD_ACCESS
DEFINES += -ffast-math
#DEFINES += -msoft-float
DEFINES += -finline -finline-functions -fexpensive-optimizations
DEFINES += -falign-functions=16 -falign-loops -falign-labels
DEFINES += -falign-jumps -fstrict-aliasing -fsigned-char -frename-registers -fweb
DEFINES += -fomit-frame-pointer

DEFINES += -ffast-math -funroll-loops -fomit-frame-pointer

INCLUDES   = -I$(LIBRETRO_DIR) -I$(CORE_DIR) -I.
DEFINES    += -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline
DEFINES    += -DUSE_SA1

ifeq ($(ARM_ASM), 1)
DEFINES += -mstructure-size-boundary=32 
DEFINES += -DARM_ASM
endif

ifeq ($(platform), sncps3)
WARNINGS_DEFINES =
CODE_DEFINES =
else
WARNINGS_DEFINES = -Wall -W -Wno-unused-parameter -Wno-parentheses -Wno-write-strings -Wno-comment -Werror=implicit-function-declaration
CODE_DEFINES = -fomit-frame-pointer
endif

COMMON_DEFINES += $(CODE_DEFINES) $(WARNINGS_DEFINES) $(fpic)