2 CFLAGS += -fprofile-generate
5 CFLAGS += -fprofile-use
13 ifeq "$(readline)" "1"
14 DEFINES += HAVE_READLINE
20 OBJS += platform/linux/pprof.o
24 ifeq "$(asm_render)" "1"
25 DEFINES += _ASM_DRAW_C
26 OBJS += pico/draw_arm.o pico/draw2_arm.o
28 ifeq "$(asm_memory)" "1"
29 DEFINES += _ASM_MEMORY_C
30 OBJS += pico/memory_arm.o
32 ifeq "$(asm_ym2612)" "1"
33 DEFINES += _ASM_YM2612_C
34 OBJS += pico/sound/ym2612_arm.o
36 ifeq "$(asm_misc)" "1"
37 DEFINES += _ASM_MISC_C
38 OBJS += pico/misc_arm.o
39 OBJS += pico/cd/misc_arm.o
41 ifeq "$(asm_cdpico)" "1"
42 DEFINES += _ASM_CD_PICO_C
43 OBJS += pico/cd/pico_arm.o
45 ifeq "$(asm_cdmemory)" "1"
46 DEFINES += _ASM_CD_MEMORY_C
47 OBJS += pico/cd/memory_arm.o
49 ifeq "$(asm_32xdraw)" "1"
50 DEFINES += _ASM_32X_DRAW
51 OBJS += pico/32x/draw_arm.o
56 OBJS += pico/state.o pico/cart.o pico/memory.o pico/pico.o pico/sek.o pico/z80if.o \
57 pico/videoport.o pico/draw2.o pico/draw.o pico/mode4.o \
58 pico/misc.o pico/eeprom.o pico/patch.o pico/debug.o \
67 OBJS += pico/cd/pico.o pico/cd/memory.o pico/cd/sek.o pico/cd/LC89510.o \
68 pico/cd/cd_sys.o pico/cd/cd_file.o pico/cd/cue.o pico/cd/gfx_cd.o \
69 pico/cd/misc.o pico/cd/pcm.o pico/cd/buffering.o
72 OBJS += pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o pico/32x/pwm.o
77 OBJS += pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o
79 OBJS += pico/carthw/carthw.o
81 OBJS += pico/carthw/svp/svp.o pico/carthw/svp/memory.o \
82 pico/carthw/svp/ssp16.o
84 OBJS += pico/carthw/svp/stub_arm.o
85 OBJS += pico/carthw/svp/compiler.o
88 OBJS += pico/sound/sound.o
89 OBJS += pico/sound/sn76496.o pico/sound/ym2612.o
91 OBJS += pico/sound/mix_arm.o
93 OBJS += pico/sound/mix.o
98 ifeq "$(use_musashi)" "1"
100 OBJS += cpu/musashi/m68kops.o cpu/musashi/m68kcpu.o
101 #OBJS += cpu/musashi/m68kdasm.o
103 ifeq "$(use_cyclone)" "1"
105 OBJS += pico/m68kif_cyclone.o cpu/cyclone/Cyclone.o cpu/cyclone/tools/idle.o
107 ifeq "$(use_fame)" "1"
109 OBJS += cpu/fame/famec.o
113 ifeq "$(use_drz80)" "1"
114 DEFINES += _USE_DRZ80
115 OBJS += cpu/DrZ80/drz80.o
118 ifeq "$(use_cz80)" "1"
120 OBJS += cpu/cz80/cz80.o
124 OBJS += cpu/drc/cmn.o
125 ifneq "$(no_32x)" "1"
126 OBJS += cpu/sh2/sh2.o
128 ifeq "$(use_sh2drc)" "1"
130 OBJS += cpu/sh2/compiler.o
132 DEFINES += DRC_DEBUG=$(drc_debug)
133 OBJS += cpu/sh2/mame/sh2dasm.o
134 OBJS += platform/linux/host_dasm.o
135 LDFLAGS += -lbfd -lopcodes -liberty
137 ifeq "$(drc_debug_interp)" "1"
138 DEFINES += DRC_DEBUG_INTERP
143 ifeq "$(use_sh2mame)" "1"
144 OBJS += cpu/sh2/mame/sh2pico.o
148 CFLAGS += $(addprefix -D,$(DEFINES))
153 $(CC) $(CFLAGS) -c $< -o $@
155 tools/textfilter: tools/textfilter.c
156 make -C tools/ textfilter
160 pico/carthw/svp/compiler.o : cpu/drc/emit_$(ARCH).c
161 cpu/sh2/compiler.o : cpu/drc/emit_$(ARCH).c
162 cpu/sh2/mame/sh2pico.o : cpu/sh2/mame/sh2.c
163 pico/pico.o pico/cd/pico.o : pico/pico_cmn.c pico/pico_int.h
164 pico/memory.o pico/cd/memory.o : pico/pico_int.h pico/memory.h
166 cpu/musashi/m68kops.c :
169 cpu/fame/famec.o : cpu/fame/famec.c cpu/fame/famec_opcodes.h
171 $(CC) $(CFLAGS) -Wno-unused -c $< -o $@
173 cpu/cyclone/Cyclone.s:
174 @echo building Cyclone...
175 @make -C cpu/cyclone CONFIG_FILE='\"../cyclone_config.h\"'