# settings
+#use_fbdev = 1
+#fake_in_gp2x = 1
+
use_musashi = 1
#use_fame = 1
use_cz80 = 1
#drc_debug = 3
#drc_debug_interp = 1
#profile = 1
-#fake_in_gp2x = 1
+
+all: mkdirs PicoDrive
-include Makefile.local
CFLAGS += -mcpu=arm920t
DEFINES += ARM
endif
-LDFLAGS += -lpthread
-LDFLAGS += -lX11
-CC = $(CROSS)gcc
+CC ?= $(CROSS)gcc
# frontend
OBJS += io.o emu.o blit.o in_evdev.o plat.o sndout_oss.o log_io.o
platform/common/config.o platform/common/fonts.o platform/common/readpng.o \
platform/common/input.o
+ifeq "$(use_fbdev)" "1"
+DEFINES += FBDEV
+OBJS += fbdev.o
+else
+LDFLAGS += -lpthread
+LDFLAGS += -lX11
+endif
+
ifeq "$(fake_in_gp2x)" "1"
DEFINES += IN_GP2X FAKE_IN_GP2X
OBJS += platform/gp2x/in_gp2x.o
vpath %.S = ../..
vpath %.asm = ../..
-DIRS += platform/linux
-
-all: mkdirs PicoDrive
+DIRS += platform/linux zlib unzip
include ../common/common.mak
include ../common/revision.mak
@echo ">>>" $@
$(CC) $(CFLAGS) $^ $(LDFLAGS) -Wl,-Map=PicoDrive.map -o $@
+pprof: pprof.c
+ $(CROSS)gcc -O2 -ggdb -DPPROF -DPPROF_TOOL -I../../ -I. $^ -o $@
+
%.o : %.asm
@echo ">>>" $<
nasm -f elf $< -o $@