X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2FMakefile;h=5c7722028f999607614260a62e2c8a2249b940db;hb=3028a8e4d79f2e76a010c37acaa16f65ab436236;hp=8d83aafaf66a389d2a16938ada3fdeef3f39f6fd;hpb=b2f512cab27fa3ac45d2aa944899b1c2b582906d;p=libpicofe.git diff --git a/linux/Makefile b/linux/Makefile index 8d83aaf..5c77220 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -2,6 +2,8 @@ use_musashi = 1 #use_fame = 1 #use_mz80 = 1 +use_sh2drc = 1 +drc_debug = 1 #profile = 1 #fake_in_gp2x = 1 @@ -12,7 +14,7 @@ CFLAGS += -O3 -Wall CFLAGS += -ftracer -fstrength-reduce -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math CFLAGS += -fprofile-generate else -CFLAGS = -ggdb -Wall -falign-functions=2 +CFLAGS += -ggdb -Wall -falign-functions=2 endif DEFINES = _UNZIP_SUPPORT IO_STATS IN_EVDEV CFLAGS += -I../.. -I. @@ -72,7 +74,22 @@ DEFINES += _USE_CZ80 OBJS += cpu/cz80/cz80.o endif # sh2 -OBJS += cpu/sh2mame/sh2pico.o +OBJS += cpu/sh2/sh2.o +ifeq "$(use_sh2drc)" "1" +DEFINES += DRC_SH2 DRC_TMP +OBJS += cpu/sh2/mame/sh2pico.o +OBJS += cpu/sh2/compiler.o +OBJS += cpu/sh2/stub_x86.o +ifeq "$(drc_debug)" "1" +DEFINES += DRC_DEBUG +OBJS += cpu/sh2/mame/sh2dasm.o +OBJS += host_dasm.o +LDFLAGS += -lbfd -lopcodes +endif +else +OBJS += cpu/sh2/mame/sh2pico.o +endif +OBJS += cpu/drc/cmn.o # misc ifeq "$(use_fame)" "1" ifeq "$(use_musashi)" "1" @@ -83,9 +100,10 @@ endif CFLAGS += $(addprefix -D,$(DEFINES)) vpath %.c = ../.. +vpath %.asm = ../.. DIRS = platform platform/gp2x platform/common pico pico/cd pico/pico pico/sound pico/carthw/svp \ - pico/32x zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80 cpu/sh2mame + pico/32x zlib unzip cpu cpu/musashi cpu/fame cpu/mz80 cpu/cz80 cpu/sh2/mame cpu/drc all: mkdirs PicoDrive clean: tidy @@ -124,6 +142,9 @@ cpu/mz80/mz80.o : ../../cpu/mz80/mz80.asm .s.o: @echo ">>>" $< $(CC) $(CFLAGS) -c $< -o $@ +%.o : %.asm + @echo ">>>" $< + nasm -f elf $< -o $@ cpu/fame/famec.o : ../../cpu/fame/famec.c ../../cpu/fame/famec_opcodes.h