2015-10-14 08:09:05 +01:00
|
|
|
ifeq ($(PLATFORM),)
|
|
|
|
PLATFORM = rpi2
|
|
|
|
endif
|
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
ifeq ($(PLATFORM),rpi2)
|
|
|
|
CPU_FLAGS += -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
2016-07-10 16:50:25 +02:00
|
|
|
MORE_CFLAGS += -DCAPSLOCK_DEBIAN_WORKAROUND -DARMV6T2
|
2016-03-19 08:59:42 +00:00
|
|
|
LDFLAGS += -lbcm_host
|
2015-10-14 07:49:34 +01:00
|
|
|
DEFS += -DRASPBERRY
|
|
|
|
HAVE_NEON = 1
|
2016-01-24 17:42:00 +01:00
|
|
|
HAVE_DISPMANX = 1
|
2015-10-14 07:49:34 +01:00
|
|
|
USE_PICASSO96 = 1
|
|
|
|
else ifeq ($(PLATFORM),rpi1)
|
|
|
|
CPU_FLAGS += -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard
|
2016-05-14 18:57:55 +00:00
|
|
|
MORE_CFLAGS += -DCAPSLOCK_DEBIAN_WORKAROUND
|
2016-03-19 08:59:42 +00:00
|
|
|
LDFLAGS += -lbcm_host
|
2016-01-24 17:42:00 +01:00
|
|
|
HAVE_DISPMANX = 1
|
2015-10-14 07:49:34 +01:00
|
|
|
DEFS += -DRASPBERRY
|
2016-01-24 17:42:00 +01:00
|
|
|
else ifeq ($(PLATFORM),generic-sdl)
|
2016-08-01 18:58:01 +02:00
|
|
|
# On Raspberry Pi uncomment below line or remove ARMV6T2 define.
|
|
|
|
#CPU_FLAGS= -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
|
|
|
MORE_CFLAGS += -DARMV6T2
|
2016-02-12 19:02:04 +00:00
|
|
|
HAVE_SDL_DISPLAY = 1
|
|
|
|
else ifeq ($(PLATFORM),gles)
|
2016-07-31 19:42:14 +02:00
|
|
|
# For Raspberry Pi uncomment the two below lines
|
2016-03-19 08:59:42 +00:00
|
|
|
#LDFLAGS += -lbcm_host
|
2016-07-31 23:27:47 +02:00
|
|
|
#CPU_FLAGS= -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
2016-07-10 16:50:25 +02:00
|
|
|
MORE_CFLAGS += -DARMV6T2
|
2016-02-12 19:02:04 +00:00
|
|
|
HAVE_GLES_DISPLAY = 1
|
|
|
|
HAVE_NEON = 1
|
2015-10-14 07:49:34 +01:00
|
|
|
endif
|
2015-05-13 18:47:23 +00:00
|
|
|
|
|
|
|
NAME = uae4arm
|
|
|
|
RM = rm -f
|
2015-10-14 07:49:34 +01:00
|
|
|
CXX = g++
|
2015-05-23 11:16:41 +00:00
|
|
|
STRIP = strip
|
2015-05-13 18:47:23 +00:00
|
|
|
|
|
|
|
PROG = $(NAME)
|
|
|
|
|
|
|
|
all: $(PROG)
|
|
|
|
|
|
|
|
PANDORA=1
|
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
SDL_CFLAGS = `sdl-config --cflags`
|
2015-05-13 18:47:23 +00:00
|
|
|
|
2016-04-25 17:12:37 +00:00
|
|
|
DEFS += `xml2-config --cflags`
|
2016-07-10 16:50:25 +02:00
|
|
|
DEFS += -DCPU_arm -DARM_ASSEMBLY -DARMV6_ASSEMBLY -DGP2X -DPANDORA -DSIX_AXIS_WORKAROUND
|
2016-04-25 17:12:37 +00:00
|
|
|
DEFS += -DWITH_INGAME_WARNING
|
2015-10-14 07:49:34 +01:00
|
|
|
DEFS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\"
|
2015-11-16 22:32:10 +01:00
|
|
|
DEFS += -DUSE_SDL
|
2015-10-11 14:23:51 +02:00
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
ifeq ($(USE_PICASSO96), 1)
|
|
|
|
DEFS += -DPICASSO96
|
|
|
|
endif
|
2015-05-13 18:47:23 +00:00
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
ifeq ($(HAVE_NEON), 1)
|
|
|
|
DEFS += -DUSE_ARMNEON
|
|
|
|
endif
|
2015-05-13 18:47:23 +00:00
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
MORE_CFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads
|
2015-05-13 18:47:23 +00:00
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
MORE_CFLAGS += -Isrc -Isrc/od-pandora -Isrc/gp2x -Isrc/threaddep -Isrc/menu -Isrc/include -Isrc/gp2x/menu -Wno-unused -Wno-format -DGCCCONSTFUNC="__attribute__((const))"
|
|
|
|
MORE_CFLAGS += -fexceptions -fpermissive
|
2015-05-13 18:47:23 +00:00
|
|
|
|
2016-07-10 18:01:00 +02:00
|
|
|
LDFLAGS += -lSDL -lpthread -lm -lz -lSDL_image -lpng -lrt -lxml2 -lFLAC -lmpg123
|
|
|
|
LDFLAGS += -lSDL_ttf -lguichan_sdl -lguichan -L/opt/vc/lib
|
2015-05-13 18:47:23 +00:00
|
|
|
|
|
|
|
ifndef DEBUG
|
2015-10-14 07:49:34 +01:00
|
|
|
MORE_CFLAGS += -O3 -fomit-frame-pointer
|
|
|
|
MORE_CFLAGS += -finline -fno-builtin
|
2015-05-13 18:47:23 +00:00
|
|
|
else
|
|
|
|
MORE_CFLAGS += -ggdb
|
|
|
|
endif
|
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
ASFLAGS += $(CPU_FLAGS)
|
2015-05-13 18:47:23 +00:00
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
CXXFLAGS += $(SDL_CFLAGS) $(CPU_FLAGS) $(DEFS) $(MORE_CFLAGS)
|
2015-05-13 18:47:23 +00:00
|
|
|
|
2016-07-10 13:48:11 +02:00
|
|
|
|
|
|
|
# src/kb-sdl/keyboard.o \
|
|
|
|
|
2015-05-13 18:47:23 +00:00
|
|
|
OBJS = \
|
2016-07-10 13:48:11 +02:00
|
|
|
src/akiko.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/aros.rom.o \
|
2015-05-13 18:47:23 +00:00
|
|
|
src/audio.o \
|
|
|
|
src/autoconf.o \
|
|
|
|
src/blitfunc.o \
|
|
|
|
src/blittable.o \
|
|
|
|
src/blitter.o \
|
2016-07-10 13:48:11 +02:00
|
|
|
src/blkdev.o \
|
|
|
|
src/blkdev_cdimage.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/bsdsocket.o \
|
2016-07-10 13:48:11 +02:00
|
|
|
src/cdrom.o \
|
2015-05-13 18:47:23 +00:00
|
|
|
src/cfgfile.o \
|
|
|
|
src/cia.o \
|
|
|
|
src/crc32.o \
|
|
|
|
src/custom.o \
|
|
|
|
src/disk.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/diskutil.o \
|
2015-05-13 18:47:23 +00:00
|
|
|
src/drawing.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/events.o \
|
2015-05-13 18:47:23 +00:00
|
|
|
src/expansion.o \
|
|
|
|
src/filesys.o \
|
|
|
|
src/fpp.o \
|
|
|
|
src/fsdb.o \
|
|
|
|
src/fsdb_unix.o \
|
|
|
|
src/fsusage.o \
|
|
|
|
src/gfxutil.o \
|
|
|
|
src/hardfile.o \
|
|
|
|
src/inputdevice.o \
|
|
|
|
src/keybuf.o \
|
|
|
|
src/main.o \
|
|
|
|
src/memory.o \
|
|
|
|
src/native2amiga.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/rommgr.o \
|
2015-05-13 18:47:23 +00:00
|
|
|
src/savestate.o \
|
|
|
|
src/traps.o \
|
2015-05-17 07:52:43 +00:00
|
|
|
src/uaelib.o \
|
2015-11-16 22:32:10 +01:00
|
|
|
src/uaeresource.o \
|
2015-05-13 18:47:23 +00:00
|
|
|
src/zfile.o \
|
2015-09-09 21:49:41 +02:00
|
|
|
src/zfile_archive.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/archivers/7z/Archive/7z/7zAlloc.o \
|
|
|
|
src/archivers/7z/Archive/7z/7zDecode.o \
|
|
|
|
src/archivers/7z/Archive/7z/7zExtract.o \
|
|
|
|
src/archivers/7z/Archive/7z/7zHeader.o \
|
|
|
|
src/archivers/7z/Archive/7z/7zIn.o \
|
|
|
|
src/archivers/7z/Archive/7z/7zItem.o \
|
|
|
|
src/archivers/7z/7zBuf.o \
|
2015-09-09 21:49:41 +02:00
|
|
|
src/archivers/7z/7zCrc.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/archivers/7z/7zStream.o \
|
2016-07-10 13:48:11 +02:00
|
|
|
src/archivers/7z/Bcj2.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/archivers/7z/Bra.o \
|
|
|
|
src/archivers/7z/Bra86.o \
|
|
|
|
src/archivers/7z/LzmaDec.o \
|
2015-09-09 21:49:41 +02:00
|
|
|
src/archivers/dms/crc_csum.o \
|
|
|
|
src/archivers/dms/getbits.o \
|
|
|
|
src/archivers/dms/maketbl.o \
|
|
|
|
src/archivers/dms/pfile.o \
|
|
|
|
src/archivers/dms/tables.o \
|
|
|
|
src/archivers/dms/u_deep.o \
|
|
|
|
src/archivers/dms/u_heavy.o \
|
|
|
|
src/archivers/dms/u_init.o \
|
|
|
|
src/archivers/dms/u_medium.o \
|
|
|
|
src/archivers/dms/u_quick.o \
|
|
|
|
src/archivers/dms/u_rle.o \
|
2015-10-11 14:23:51 +02:00
|
|
|
src/archivers/lha/crcio.o \
|
|
|
|
src/archivers/lha/dhuf.o \
|
|
|
|
src/archivers/lha/header.o \
|
|
|
|
src/archivers/lha/huf.o \
|
|
|
|
src/archivers/lha/larc.o \
|
|
|
|
src/archivers/lha/lhamaketbl.o \
|
|
|
|
src/archivers/lha/lharc.o \
|
|
|
|
src/archivers/lha/shuf.o \
|
|
|
|
src/archivers/lha/slide.o \
|
|
|
|
src/archivers/lha/uae_lha.o \
|
|
|
|
src/archivers/lha/util.o \
|
|
|
|
src/archivers/lzx/unlzx.o \
|
2015-09-09 21:49:41 +02:00
|
|
|
src/archivers/wrp/warp.o \
|
|
|
|
src/archivers/zip/unzip.o \
|
2015-05-23 13:28:13 +00:00
|
|
|
src/md-pandora/support.o \
|
2016-04-24 09:45:29 +00:00
|
|
|
src/od-pandora/bsdsocket_host.o \
|
2016-07-10 13:48:11 +02:00
|
|
|
src/od-pandora/cda_play.o \
|
2015-05-14 15:18:43 +00:00
|
|
|
src/od-pandora/fsdb_host.o \
|
2016-04-25 17:12:37 +00:00
|
|
|
src/od-pandora/hardfile_pandora.o \
|
2016-07-10 13:48:11 +02:00
|
|
|
src/od-pandora/keyboard.o \
|
2016-07-10 18:01:00 +02:00
|
|
|
src/od-pandora/mp3decoder.o \
|
2015-05-14 15:18:43 +00:00
|
|
|
src/od-pandora/writelog.o \
|
|
|
|
src/od-pandora/pandora.o \
|
|
|
|
src/od-pandora/pandora_filesys.o \
|
2016-07-10 13:48:11 +02:00
|
|
|
src/od-pandora/pandora_input.o \
|
2015-05-14 15:18:43 +00:00
|
|
|
src/od-pandora/pandora_gui.o \
|
2016-04-25 17:12:37 +00:00
|
|
|
src/od-pandora/pandora_rp9.o \
|
2015-05-14 15:18:43 +00:00
|
|
|
src/od-pandora/pandora_mem.o \
|
|
|
|
src/od-pandora/sigsegv_handler.o \
|
|
|
|
src/od-pandora/menu/menu_config.o \
|
|
|
|
src/sd-sdl/sound_sdl_new.o \
|
|
|
|
src/od-pandora/gui/UaeRadioButton.o \
|
|
|
|
src/od-pandora/gui/UaeDropDown.o \
|
|
|
|
src/od-pandora/gui/UaeCheckBox.o \
|
|
|
|
src/od-pandora/gui/UaeListBox.o \
|
|
|
|
src/od-pandora/gui/InGameMessage.o \
|
|
|
|
src/od-pandora/gui/SelectorEntry.o \
|
|
|
|
src/od-pandora/gui/ShowMessage.o \
|
|
|
|
src/od-pandora/gui/SelectFolder.o \
|
|
|
|
src/od-pandora/gui/SelectFile.o \
|
2015-10-11 14:23:51 +02:00
|
|
|
src/od-pandora/gui/CreateFilesysHardfile.o \
|
2015-05-14 15:18:43 +00:00
|
|
|
src/od-pandora/gui/EditFilesysVirtual.o \
|
|
|
|
src/od-pandora/gui/EditFilesysHardfile.o \
|
|
|
|
src/od-pandora/gui/PanelPaths.o \
|
|
|
|
src/od-pandora/gui/PanelConfig.o \
|
|
|
|
src/od-pandora/gui/PanelCPU.o \
|
|
|
|
src/od-pandora/gui/PanelChipset.o \
|
|
|
|
src/od-pandora/gui/PanelROM.o \
|
|
|
|
src/od-pandora/gui/PanelRAM.o \
|
|
|
|
src/od-pandora/gui/PanelFloppy.o \
|
|
|
|
src/od-pandora/gui/PanelHD.o \
|
|
|
|
src/od-pandora/gui/PanelDisplay.o \
|
|
|
|
src/od-pandora/gui/PanelSound.o \
|
|
|
|
src/od-pandora/gui/PanelInput.o \
|
|
|
|
src/od-pandora/gui/PanelMisc.o \
|
|
|
|
src/od-pandora/gui/PanelSavestate.o \
|
|
|
|
src/od-pandora/gui/main_window.o \
|
|
|
|
src/od-pandora/gui/Navigation.o
|
2016-01-24 17:42:00 +01:00
|
|
|
|
|
|
|
ifeq ($(HAVE_DISPMANX), 1)
|
|
|
|
OBJS += src/od-rasp/rasp_gfx.o
|
2016-02-12 19:02:04 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_SDL_DISPLAY), 1)
|
2016-01-24 17:42:00 +01:00
|
|
|
OBJS += src/od-pandora/pandora_gfx.o
|
|
|
|
endif
|
|
|
|
|
2016-02-12 19:02:04 +00:00
|
|
|
ifeq ($(HAVE_GLES_DISPLAY), 1)
|
|
|
|
OBJS += src/od-gles/gl.o
|
|
|
|
OBJS += src/od-gles/gl_platform.o
|
|
|
|
OBJS += src/od-gles/gles_gfx.o
|
|
|
|
MORE_CFLAGS += -I/opt/vc/include/
|
|
|
|
MORE_CFLAGS += -DHAVE_GLES
|
2016-03-19 08:59:42 +00:00
|
|
|
LDFLAGS += -ldl -lEGL -lGLESv1_CM
|
2016-02-12 19:02:04 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2015-05-13 18:47:23 +00:00
|
|
|
ifdef PANDORA
|
2015-05-14 15:18:43 +00:00
|
|
|
OBJS += src/od-pandora/gui/sdltruetypefont.o
|
2015-05-13 18:47:23 +00:00
|
|
|
endif
|
|
|
|
|
2015-10-14 07:49:34 +01:00
|
|
|
ifeq ($(USE_PICASSO96), 1)
|
|
|
|
OBJS += src/od-pandora/picasso96.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_NEON), 1)
|
|
|
|
OBJS += src/od-pandora/neon_helper.o
|
|
|
|
endif
|
|
|
|
|
2015-05-13 18:47:23 +00:00
|
|
|
OBJS += src/newcpu.o
|
|
|
|
OBJS += src/readcpu.o
|
|
|
|
OBJS += src/cpudefs.o
|
|
|
|
OBJS += src/cpustbl.o
|
|
|
|
OBJS += src/cpuemu_0.o
|
2015-10-11 14:23:51 +02:00
|
|
|
OBJS += src/cpuemu_4.o
|
2015-09-09 21:49:41 +02:00
|
|
|
OBJS += src/cpuemu_11.o
|
2015-11-16 22:32:10 +01:00
|
|
|
OBJS += src/jit/compemu.o
|
|
|
|
OBJS += src/jit/compstbl.o
|
2016-06-25 09:23:49 +00:00
|
|
|
OBJS += src/jit/compemu_fpp.o
|
2015-11-16 22:32:10 +01:00
|
|
|
OBJS += src/jit/compemu_support.o
|
2015-05-13 18:47:23 +00:00
|
|
|
|
|
|
|
src/osdep/neon_helper.o: src/osdep/neon_helper.s
|
2015-10-14 07:49:34 +01:00
|
|
|
$(CXX) $(CPU_FLAGS) -Wall -o src/osdep/neon_helper.o -c src/osdep/neon_helper.s
|
2015-05-13 18:47:23 +00:00
|
|
|
|
|
|
|
$(PROG): $(OBJS)
|
2015-10-14 07:49:34 +01:00
|
|
|
$(CXX) -o $(PROG) $(OBJS) $(LDFLAGS)
|
2015-05-13 18:47:23 +00:00
|
|
|
ifndef DEBUG
|
|
|
|
$(STRIP) $(PROG)
|
|
|
|
endif
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(PROG) $(OBJS)
|