forked from emukidid/Wii64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.base
171 lines (148 loc) · 3.96 KB
/
Makefile.base
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Makefile variables and targets used in all builds
export LIBOGC_INC := $(DEVKITPRO)/libogc2/include
CC = powerpc-eabi-gcc
CXX = powerpc-eabi-g++
AS = powerpc-eabi-as
LTO = #-flto # Uncomment to use link-time optimization
DEBUG_FLAGS += #-DSHOW_DEBUG #-DPROFILE #-DSHOW_DEBUG #-DDEBUGON #-DPRINTGECKO #-DGLN64_SDLOG #-DNO_BT
MACHDEP += -mcpu=750 -meabi -mhard-float
LDFLAGS += -O3 $(LTO) $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--cref $(LTO)
INCLUDE += -I$(DEVKITPRO)/libogc2/include -I$(DEVKITPRO)/portlibs/ppc/include
LIBPATHS += -L$(DEVKITPRO)/portlibs/ppc/lib
CXXFLAGS += \
-g -O3 $(LTO) -Wall -Wno-parentheses -Wno-unused-parameter -pipe $(MACHDEP) $(INCLUDE) \
-DGEKKO -D__GX__ -DUSE_GUI -DRELEASE -DMENU_V2 \
-DTHREADED_AUDIO -DUSE_RECOMP_CACHE -DPPC_DYNAREC -DFASTMEM -DNO_ASM \
$(DEBUG_FLAGS) $(FEATURES) #-fno-exceptions
CFLAGS += $(CXXFLAGS) -fgnu89-inline -Wno-multichar
OBJ += \
main/gamehacks.o \
main/rom_gc.o \
main/ROM-Cache.o \
main/main_gc-menu2.o \
main/gczip.o \
main/timers.o \
main/boxart.o \
main/boxart_resource.o \
menu/MenuContext.o \
menu/MainFrame.o \
menu/MiniMenuFrame.o \
menu/SelectRomFrame.o \
menu/LoadRomFrame.o \
menu/FileBrowserFrame.o \
menu/ConfigureButtonsFrame.o\
menu/ConfigureInputFrame.o\
menu/ConfigurePaksFrame.o\
menu/CurrentRomFrame.o \
menu/LoadSaveFrame.o \
menu/SaveGameFrame.o \
menu/SettingsFrame.o\
menu/SelectCPUFrame.o\
menu/MenuResources.o \
libgui/Box3D.o \
libgui/Button.o \
libgui/Component.o \
libgui/CursorManager.o \
libgui/FocusManager.o \
libgui/Frame.o \
libgui/GraphicsGX.o \
libgui/Gui.o \
libgui/GuiResources.o \
libgui/Image.o \
libgui/InputManager.o \
libgui/InputStatusBar.o \
libgui/IPLFont.o \
libgui/LoadingBar.o \
libgui/Logo.o \
libgui/MainInfoBar.o \
libgui/MessageBox.o \
libgui/MiniInfoBar.o \
libgui/resources.o \
libgui/TextBox.o \
fileBrowser/gc_dvd.o \
fileBrowser/fileBrowser-DVD.o \
fileBrowser/fileBrowser-CARD.o \
fileBrowser/fileBrowser-libfat.o \
fileBrowser/fileBrowser.o \
gui/GUI.o \
gui/DEBUG.o \
gui/TEXT.o \
r4300/r4300.o \
r4300/exception.o \
r4300/Invalid_Code.o \
r4300/Recomp-Cache-Heap.o \
gc_memory/tlb.o \
gc_memory/memory.o \
gc_memory/dma.o \
r4300/interupt.o \
r4300/recomp.o \
gc_memory/n64_cic_nus_6105.o \
gc_memory/pif.o \
r4300/pure_interp.o \
r4300/compare_core.o \
gc_memory/flashram.o \
main/md5.o \
main/savestates_gc.o \
r4300/profile.o \
main/adler32.o
OBJ_PPC += \
r4300/ppc/MIPS-to-PPC.o \
r4300/ppc/Recompile.o \
r4300/ppc/Wrappers.o \
r4300/ppc/FuncTree.o \
r4300/ppc/Register-Cache.o
OBJ_INPUT += \
gc_input/input.o \
gc_input/controller-GC.o
OBJ_RSPHLE =rsp_hle/alist.o \
rsp_hle/alist_audio.o \
rsp_hle/alist_naudio.o \
rsp_hle/alist_nead.o \
rsp_hle/audio.o \
rsp_hle/cicx105.o \
rsp_hle/hle.o \
rsp_hle/hvqm.o \
rsp_hle/jpeg.o \
rsp_hle/memory.o \
rsp_hle/mp3.o \
rsp_hle/musyx.o \
rsp_hle/re2.o \
rsp_hle/plugin.o
OBJ_RSPHLEPPC += \
rsp_hle-ppc/main.o \
rsp_hle-ppc/jpeg.o \
rsp_hle-ppc/ucode3.o \
rsp_hle-ppc/ucode2.o \
rsp_hle-ppc/ucode1.o
OBJ_AUDIO += \
gc_audio/audio.o
HEADER += \
main/rom.h \
r4300/r4300.h \
r4300/macros.h \
r4300/exception.h \
gc_memory/memory.h \
gc_memory/tlb.h \
gc_memory/dma.h \
r4300/interupt.h \
r4300/recomp.h \
gc_memory/pif.h
LIB += -logc -lm -lfat -ldb -lz -laesnd -logc -static
ALL_OBJ += $(OBJ) $(OBJ_INPUT) $(OBJ_AUDIO) $(OBJ_RSPHLE) $(OBJ_PPC)
ifeq ($(strip mupen64_GX_gfx/main.cpp),)
export LD := $(CC)
else
export LD := $(CXX)
endif
all: $(DOL)
$(ELF): $(ALL_OBJ)
$(LD) $^ $(LDFLAGS) $(LIBPATHS) $(LIB) -o $@
$(DOL): $(ELF)
elf2dol $(ELF) $(DOL)
# DolTool -d $(ELF)
clean:
find . -name '*.o' -print0 | xargs -0r rm -f
menu/MenuResources.o: menu/MenuResources.s
$(CC) -x assembler-with-cpp $(CFLAGS) -c -o $@ $<
vm/dsihandler.o: vm/dsihandler.s
$(CC) -x assembler-with-cpp $(CFLAGS) -D_LANGUAGE_ASSEMBLY -c -o $@ $<