|
1 | 1 | TARGET ?= PicoDrive
|
2 |
| -DEBUG ?= 0 |
3 |
| -CFLAGS += -Wall -g |
| 2 | +CFLAGS += -Wall -ggdb -falign-functions=2 |
4 | 3 | CFLAGS += -I.
|
5 |
| -ifeq "$(DEBUG)" "0" |
6 |
| -CFLAGS += -O3 -DNDEBUG |
| 4 | +ifndef DEBUG |
| 5 | +CFLAGS += -O3 -DNDEBUG -ffunction-sections |
| 6 | +ifeq ($(findstring clang,$(CC)),) |
| 7 | +LDFLAGS += -Wl,--gc-sections |
7 | 8 | endif
|
8 |
| - |
9 |
| -# This is actually needed, bevieve me. |
10 |
| -# If you really have to disable this, set NO_ALIGN_FUNCTIONS elsewhere. |
11 |
| -ifndef NO_ALIGN_FUNCTIONS |
12 |
| -CFLAGS += -falign-functions=2 |
13 | 9 | endif
|
| 10 | +#CFLAGS += -DEVT_LOG |
| 11 | +#CFLAGS += -DDRC_CMP |
| 12 | +#cpu_cmp = 1 |
| 13 | +#drc_debug = 7 |
| 14 | +#profile = 1 |
| 15 | + |
14 | 16 |
|
15 | 17 | all: config.mak target_
|
16 | 18 |
|
@@ -45,13 +47,15 @@ asm_mix ?= 1
|
45 | 47 | else # if not arm
|
46 | 48 | use_fame ?= 1
|
47 | 49 | use_cz80 ?= 1
|
48 |
| -ifneq (,$(findstring 86,$(ARCH))) |
49 |
| -use_sh2drc ?= 1 |
50 |
| -endif |
51 | 50 | endif
|
52 | 51 |
|
53 | 52 | -include Makefile.local
|
54 | 53 |
|
| 54 | +ifneq "$(use_cyclone)" "1" |
| 55 | +# due to CPU stop flag access |
| 56 | +asm_cdmemory = 0 |
| 57 | +endif |
| 58 | + |
55 | 59 | ifeq "$(PLATFORM)" "opendingux"
|
56 | 60 | opk: $(TARGET).opk
|
57 | 61 |
|
|
70 | 74 | ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","rpi1" "rpi2"))
|
71 | 75 | CFLAGS += -DHAVE_GLES -DRASPBERRY
|
72 | 76 | CFLAGS += -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads/ -I/opt/vc/include/interface/vmcs_host/linux/
|
73 |
| -LDFLAGS += -ldl -lbcm_host -L/opt/vc/lib |
74 |
| -# Stupid renaming occured in latest raspbian... |
75 |
| -ifneq (,$(wildcard /opt/vc/lib/libbrcmGLESv2.so)) |
76 |
| -LDFLAGS += -lbrcmEGL -lbrcmGLESv2 |
77 |
| -else |
78 |
| -LDFLAGS += -lEGL -lGLESv2 |
79 |
| -endif |
| 77 | +LDFLAGS += -ldl -lbcm_host -L/opt/vc/lib -lEGL -lGLESv2 |
80 | 78 | OBJS += platform/linux/emu.o platform/linux/blit.o # FIXME
|
81 | 79 | OBJS += platform/common/plat_sdl.o
|
82 | 80 | OBJS += platform/libpicofe/plat_sdl.o platform/libpicofe/in_sdl.o
|
@@ -121,7 +119,7 @@ USE_FRONTEND = 1
|
121 | 119 | PLATFORM_MP3 = 1
|
122 | 120 | endif
|
123 | 121 | ifeq "$(PLATFORM)" "libretro"
|
124 |
| -OBJS += platform/libretro/libretro.o |
| 122 | +OBJS += platform/libretro.o |
125 | 123 | endif
|
126 | 124 |
|
127 | 125 | ifeq "$(USE_FRONTEND)" "1"
|
@@ -191,11 +189,7 @@ clean:
|
191 | 189 | $(RM) -r .opk_data
|
192 | 190 |
|
193 | 191 | $(TARGET): $(OBJS)
|
194 |
| -ifeq ($(STATIC_LINKING), 1) |
195 |
| - $(AR) rcs $@ $^ |
196 |
| -else |
197 | 192 | $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) $(LDLIBS)
|
198 |
| -endif |
199 | 193 |
|
200 | 194 | pprof: platform/linux/pprof.c
|
201 | 195 | $(CC) -O2 -ggdb -DPPROF -DPPROF_TOOL -I../../ -I. $^ -o $@
|
@@ -223,19 +217,17 @@ pico/cd/gfx_cd.o: CFLAGS += -fno-strict-aliasing
|
223 | 217 | # on x86, this is reduced by ~300MB when debug info is off (but not on ARM)
|
224 | 218 | # not using O3 and -fno-expensive-optimizations seems to also help, but you may
|
225 | 219 | # want to remove this stuff for better performance if your compiler can handle it
|
226 |
| -ifeq "$(DEBUG)" "0" |
| 220 | +ifndef DEBUG |
227 | 221 | cpu/fame/famec.o: CFLAGS += -g0 -O2 -fno-expensive-optimizations
|
228 | 222 | endif
|
229 | 223 |
|
230 | 224 | pico/carthw_cfg.c: pico/carthw.cfg
|
231 | 225 | tools/make_carthw_c $< $@
|
232 | 226 |
|
233 | 227 | # random deps
|
234 |
| -pico/carthw/svp/compiler.o : cpu/drc/emit_arm.c |
235 |
| -cpu/sh2/compiler.o : cpu/drc/emit_arm.c |
236 |
| -cpu/sh2/compiler.o : cpu/drc/emit_x86.c |
| 228 | +pico/carthw/svp/compiler.o : cpu/drc/emit_$(ARCH).c |
| 229 | +cpu/sh2/compiler.o : cpu/drc/emit_$(ARCH).c |
237 | 230 | cpu/sh2/mame/sh2pico.o : cpu/sh2/mame/sh2.c
|
238 | 231 | pico/pico.o pico/cd/mcd.o pico/32x/32x.o : pico/pico_cmn.c pico/pico_int.h
|
239 | 232 | pico/memory.o pico/cd/memory.o pico/32x/memory.o : pico/pico_int.h pico/memory.h
|
240 |
| -# pico/cart.o : pico/carthw_cfg.c |
241 | 233 | cpu/fame/famec.o: cpu/fame/famec.c cpu/fame/famec_opcodes.h
|
0 commit comments