This repository has been archived by the owner on Sep 12, 2020. It is now read-only.
forked from zear/uae4all
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.dc
165 lines (134 loc) · 4.13 KB
/
Makefile.dc
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
TARGET = uae4all
USE_DC_SQ = YES
KOS_CFLAGS+= -I$(KOS_BASE)/addons/include -I$(KOS_BASE)/addons/include/SDL -DDREAMCAST
KOS_CFLAGS+= -O3 -fomit-frame-pointer -ffast-math
#-frename-registers -ftracer -funit-at-a-time -funswitch-loops
KOS_CFLAGS+= -Isrc/ -Isrc/include/ -Isrc/menu -Isrc/vkbd
KOS_CFLAGS+= -Wno-unused -Wno-format -DUSE_SDL -DGCCCONSTFUNC="__attribute__((const))" -DUSE_UNDERSCORE -fno-exceptions -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))" -DOPTIMIZED_FLAGS -D__inline__=__inline__ -DSHM_SUPPORT_LINKS=0 -DOS_WITHOUT_MEMORY_MANAGEMENT -DVKBD_ALWAYS
KOS_CFLAGS+= -DROM_PATH_PREFIX="/cd/" -DDATA_PREFIX="/rd/" -DSAVE_PREFIX="/vmu/a1/"
#KOS_CFLAGS+= -DSTATUS_ALWAYS
#KOS_CFLAGS+= -DUSE_MAYBE_BLIT
#KOS_CFLAGS+= -DUSE_BLITTER_DELAYED
#KOS_CFLAGS+= -DUSE_BLIT_FUNC
#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-DAUTO_FRAMERATE_SOUND
#KOS_CFLAGS+= -DAUTO_FRAMERATE_THROTTLE
#KOS_CFLAGS+= -DPROFILER_UAE4ALL
#KOS_CFLAGS+= -DAUTO_PROFILER=1600
#KOS_CFLAGS+= -DMAX_AUTO_PROFILER=3000
#KOS_CFLAGS+= -DAUTO_PROFILER=3600
#KOS_CFLAGS+= -DMAX_AUTO_PROFILER=5000
#KOS_CFLAGS+= -DAUTO_PROFILER_SOUND
#KOS_CFLAGS+= -DAUTO_PROFILER_THROTTLE
ifdef USE_DC_SQ
KOS_CFLAGS+= -DDC_SQ -falign-functions=32 -falign-labels=32 -falign-loops=32 -falign-jumps=32
endif
KOS_CPPFLAGS = $(KOS_CFLAGS)
all: $(TARGET).bin
include $(KOS_BASE)/Makefile.rules
FAME_CORE=1
#FAME_CORE_C=1
OBJS = \
src/savestate.o \
src/main.o \
src/audio.o \
src/autoconf.o \
src/blitfunc.o \
src/blittable.o \
src/blitter.o \
src/cia.o \
src/savedisk.o \
src/compiler.o \
src/custom.o \
src/disk.o \
src/drawing.o \
src/ersatz.o \
src/gfxutil.o \
src/keybuf.o \
src/md-support.o \
src/memory.o \
src/missing.o \
src/gui.o \
src/od-joy.o \
src/sound.o \
src/sdlgfx.o \
src/writelog.o \
src/zfile.o \
src/menu/fade.o \
src/menu/menu.o \
src/menu/menu_load.o \
src/menu/menu_save.o \
src/menu/menu_main.o \
src/vkbd/vkbd.o \
romdisk.o
ifdef FAME_CORE
ifdef FAME_CORE_C
KOS_CFLAGS+=-DUSE_FAME_CORE -DUSE_FAME_CORE_C
src/m68k/fame/famec.o: src/m68k/fame/famec.cpp
OBJS += src/m68k/fame/famec.o
else
KOS_CFLAGS+=-DUSE_FAME_CORE
OBJS += src/m68k/fame/fame.o
endif
OBJS += src/m68k/fame/m68k_intrf.o
else
OBJS += \
src/m68k/uae/newcpu.o \
src/m68k/uae/readcpu.o \
src/m68k/uae/cpudefs.o \
src/m68k/uae/fpp.o \
src/m68k/uae/cpustbl.o \
src/m68k/uae/cpuemu.o
endif
clean:
rm -f $(OBJS) $(TARGET).elf $(TARGET).bin romdisk.o romdisk.img example.iso
$(TARGET).elf: $(OBJS)
$(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET).elf $(KOS_START) \
$(OBJS) $(OBJEXTRA) -lSDL_mixer_126 -lSDL_1213 -lz_123 -lm $(KOS_LIBS)
$(TARGET).bin: $(TARGET).elf
$(KOS_OBJCOPY) -R .stack -O binary $(TARGET).elf $(TARGET).bin
romdisk.o: romdisk.img
$(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o
# bin2odc romdisk.img romdisk.o
romdisk.img:
$(KOS_GENROMFS) -f romdisk.img -d data -v
example.iso: example
mkisofs -joliet-long -l -o example.iso -graft-points /=example/
run: $(TARGET).bin example.iso
$(KOS_LOADER) $(TARGET).bin -i example.iso
# $(KOS_LOADER) $(TARGET).bin
# $(KOS_LOADER) $(TARGET).bin -n