32x: drc: one manual page worth of opcodes implemented (x86 and arm)
[libpicofe.git] / linux / Makefile
index e2eaf46..3638286 100644 (file)
@@ -3,7 +3,7 @@ use_musashi = 1
 #use_fame = 1
 #use_mz80 = 1
 use_sh2drc = 1
-drc_debug = 1
+#drc_debug = 3
 #profile = 1
 #fake_in_gp2x = 1
 
@@ -22,13 +22,13 @@ CFLAGS += -ggdb -Wall -falign-functions=2
 endif
 DEFINES = _UNZIP_SUPPORT IO_STATS IN_EVDEV
 CFLAGS += -I../.. -I.
-LDFLAGS += -lpthread
+LDFLAGS += -lm -lpng
 ifeq "$(ARCH)" "arm"
 CFLAGS += -mcpu=arm920t
 DEFINES += ARM
-else
-LDFLAGS += -lX11
 endif
+LDFLAGS += -lpthread
+LDFLAGS += -lX11
 
 CC = $(CROSS)gcc
 
@@ -95,11 +95,11 @@ DEFINES += DRC_SH2 DRC_TMP
 OBJS += cpu/sh2/mame/sh2pico.o
 OBJS += cpu/sh2/compiler.o
 OBJS += cpu/sh2/stub_$(ARCH).o
-ifeq "$(drc_debug)" "1"
-DEFINES += DRC_DEBUG=1
+ifdef drc_debug
+DEFINES += DRC_DEBUG=$(drc_debug)
 OBJS += cpu/sh2/mame/sh2dasm.o
 OBJS += host_dasm.o
-LDFLAGS += -lbfd -lopcodes
+LDFLAGS += -lbfd -lopcodes -liberty
 endif
 else
 OBJS += cpu/sh2/mame/sh2pico.o
@@ -132,7 +132,7 @@ tidy:
 
 PicoDrive : $(OBJS)
        @echo ">>>" $@
-       $(CC) $(CFLAGS) $^ $(LDFLAGS) -lm -lpng -Wl,-Map=PicoDrive.map -o $@
+       $(CC) $(CFLAGS) $^ $(LDFLAGS) -Wl,-Map=PicoDrive.map -o $@
 
 mkdirs:
        @mkdir -p $(DIRS)
@@ -140,6 +140,8 @@ mkdirs:
 include ../common/revision.mak
 
 pico/carthw/svp/compiler.o : ../../cpu/drc/emit_arm.c
+cpu/sh2/compiler.o : ../../cpu/drc/emit_x86.c
+cpu/sh2/mame/sh2pico.o : ../../cpu/sh2/mame/sh2.c
 pico/pico.o pico/cd/pico.o : ../../pico/pico_cmn.c ../../pico/pico_int.h
 pico/memory.o pico/cd/memory.o : ../../pico/pico_int.h ../../pico/memory.h