2007-12-17 16:19:59 +01:00
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# makefile
|
|
|
|
#
|
|
|
|
# Core makefile for building MAME and derivatives
|
|
|
|
#
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
################# BEGIN USER-CONFIGURABLE OPTIONS #####################
|
|
|
|
###########################################################################
|
|
|
|
|
2015-04-02 15:45:49 +02:00
|
|
|
# REGENIE = 1
|
|
|
|
# VERBOSE = 1
|
|
|
|
# NOWERROR = 1
|
|
|
|
|
|
|
|
# TARGET = mame
|
|
|
|
# SUBTARGET = tiny
|
|
|
|
# TOOLS = 1
|
2015-05-27 15:02:33 +02:00
|
|
|
# TESTS = 1
|
2016-01-29 11:47:40 +01:00
|
|
|
# BENCHMARKS = 1
|
2015-04-02 15:45:49 +02:00
|
|
|
# OSD = sdl
|
|
|
|
|
|
|
|
# USE_BGFX = 1
|
|
|
|
# NO_OPENGL = 1
|
|
|
|
# USE_DISPATCH_GL = 0
|
2016-01-20 00:38:14 +01:00
|
|
|
# MODERN_WIN_API = 0
|
|
|
|
# USE_XAUDIO2 = 0
|
2015-04-02 15:45:49 +02:00
|
|
|
# DIRECTINPUT = 7
|
2015-04-04 05:53:47 +02:00
|
|
|
# USE_SDL = 1
|
2015-06-06 16:32:04 +02:00
|
|
|
# SDL_INI_PATH = .;$HOME/.mame/;ini;
|
2015-04-02 15:45:49 +02:00
|
|
|
# SDL2_MULTIAPI = 1
|
|
|
|
# NO_USE_MIDI = 1
|
|
|
|
# DONT_USE_NETWORK = 1
|
|
|
|
# USE_QTDEBUG = 1
|
|
|
|
# NO_X11 = 1
|
|
|
|
# NO_USE_XINPUT = 0
|
|
|
|
# FORCE_DRC_C_BACKEND = 1
|
|
|
|
|
|
|
|
# DEBUG = 1
|
|
|
|
# PROFILER = 1
|
|
|
|
# SANITIZE = 1
|
|
|
|
|
|
|
|
# PTR64 = 1
|
|
|
|
# BIGENDIAN = 1
|
|
|
|
# NOASM = 1
|
|
|
|
|
|
|
|
# OPTIMIZE = 3
|
|
|
|
# SYMBOLS = 1
|
|
|
|
# SYMLEVEL = 2
|
|
|
|
# MAP = 1
|
|
|
|
# PROFILE = 1
|
|
|
|
# ARCHOPTS =
|
2015-06-06 13:38:19 +02:00
|
|
|
# OPT_FLAGS =
|
2015-04-02 15:45:49 +02:00
|
|
|
# LDOPTS =
|
|
|
|
|
2015-05-11 09:37:45 +02:00
|
|
|
# USE_SYSTEM_LIB_EXPAT = 1
|
2015-06-06 23:39:24 +02:00
|
|
|
# USE_SYSTEM_LIB_ZLIB = 1
|
|
|
|
# USE_SYSTEM_LIB_JPEG = 1
|
|
|
|
# USE_SYSTEM_LIB_FLAC = 1
|
|
|
|
# USE_SYSTEM_LIB_LUA = 1
|
|
|
|
# USE_SYSTEM_LIB_SQLITE3 = 1
|
|
|
|
# USE_SYSTEM_LIB_PORTMIDI = 1
|
2015-07-05 22:08:10 +02:00
|
|
|
# USE_SYSTEM_LIB_PORTAUDIO = 1
|
2015-05-11 09:37:45 +02:00
|
|
|
|
2015-04-02 15:45:49 +02:00
|
|
|
# MESA_INSTALL_ROOT = /opt/mesa
|
|
|
|
# SDL_INSTALL_ROOT = /opt/sdl2
|
|
|
|
# SDL_FRAMEWORK_PATH = $(HOME)/Library/Frameworks
|
|
|
|
# SDL_LIBVER = sdl
|
2015-12-09 16:41:34 +01:00
|
|
|
# USE_LIBSDL = 1
|
2015-04-04 05:53:47 +02:00
|
|
|
# CYGWIN_BUILD = 1
|
2015-04-02 15:45:49 +02:00
|
|
|
|
2015-11-02 12:37:01 +01:00
|
|
|
# BUILDDIR = build
|
2015-04-02 15:45:49 +02:00
|
|
|
# TARGETOS = windows
|
|
|
|
# CROSS_BUILD = 1
|
|
|
|
# OVERRIDE_CC = cc
|
|
|
|
# OVERRIDE_CXX = c++
|
|
|
|
# OVERRIDE_LD = ld
|
|
|
|
|
2015-04-06 16:27:14 +02:00
|
|
|
# DEPRECATED = 1
|
|
|
|
# LTO = 1
|
|
|
|
# SSE2 = 1
|
|
|
|
# OPENMP = 1
|
2015-04-06 16:33:21 +02:00
|
|
|
# FASTDEBUG = 1
|
2015-04-02 15:45:49 +02:00
|
|
|
|
2015-04-08 08:52:02 +02:00
|
|
|
# SEPARATE_BIN = 1
|
2015-04-08 14:19:43 +02:00
|
|
|
# PYTHON_EXECUTABLE = python3
|
2015-04-11 08:46:02 +02:00
|
|
|
# SHADOW_CHECK = 1
|
2015-04-22 14:23:49 +02:00
|
|
|
# STRIP_SYMBOLS = 0
|
2015-04-07 13:23:31 +02:00
|
|
|
|
2015-04-13 18:47:33 +02:00
|
|
|
# QT_HOME = /usr/lib64/qt48/
|
|
|
|
|
2015-11-17 20:07:00 +01:00
|
|
|
# SOURCES = src/mame/drivers/asteroid.cpp,src/mame/audio/llander.cpp
|
2015-06-20 18:20:10 +02:00
|
|
|
|
2015-09-05 11:53:19 +02:00
|
|
|
# FORCE_VERSION_COMPILE = 1
|
|
|
|
|
2015-11-23 10:01:21 +01:00
|
|
|
# MS BUILD = 1
|
|
|
|
|
2015-11-02 12:37:01 +01:00
|
|
|
ifdef PREFIX_MAKEFILE
|
|
|
|
include $(PREFIX_MAKEFILE)
|
|
|
|
else
|
2015-04-07 14:19:54 +02:00
|
|
|
-include useroptions.mak
|
2015-11-02 12:37:01 +01:00
|
|
|
endif
|
2015-04-07 14:19:54 +02:00
|
|
|
|
2015-04-02 15:45:49 +02:00
|
|
|
###########################################################################
|
|
|
|
################## END USER-CONFIGURABLE OPTIONS ######################
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
MAKEPARAMS := -R
|
|
|
|
|
2015-03-29 15:17:21 +02:00
|
|
|
#
|
|
|
|
# Determine running OS
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := windows
|
|
|
|
GENIEOS := windows
|
2015-12-27 15:35:29 +01:00
|
|
|
PLATFORM := x86
|
2015-03-29 15:17:21 +02:00
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
UNAME := $(shell uname -mps)
|
2015-12-27 15:48:44 +01:00
|
|
|
UNAME_M := $(shell uname -m)
|
2015-12-27 16:37:16 +01:00
|
|
|
UNAME_P := $(shell uname -p)
|
2015-03-31 06:13:12 +02:00
|
|
|
GENIEOS := linux
|
2015-12-27 15:35:29 +01:00
|
|
|
PLATFORM := unknown
|
2015-12-27 16:37:16 +01:00
|
|
|
ifneq ($(filter x86_64,$(UNAME_P)),)
|
2015-12-27 15:35:29 +01:00
|
|
|
PLATFORM := x86
|
|
|
|
endif
|
2015-12-27 16:37:16 +01:00
|
|
|
ifneq ($(filter %86,$(UNAME_P)),)
|
2015-12-27 15:48:44 +01:00
|
|
|
PLATFORM := x86
|
|
|
|
endif
|
|
|
|
ifneq ($(filter arm%,$(UNAME_M)),)
|
2015-12-27 15:35:29 +01:00
|
|
|
PLATFORM := arm
|
|
|
|
endif
|
2015-12-27 16:37:16 +01:00
|
|
|
ifneq ($(filter arm%,$(UNAME_P)),)
|
|
|
|
PLATFORM := arm
|
|
|
|
endif
|
|
|
|
ifneq ($(filter powerpc,$(UNAME_P)),)
|
|
|
|
PLATFORM := powerpc
|
|
|
|
endif
|
2015-03-29 15:17:21 +02:00
|
|
|
ifeq ($(firstword $(filter Linux,$(UNAME))),Linux)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := linux
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter Solaris,$(UNAME))),Solaris)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := solaris
|
2015-04-10 12:37:34 +02:00
|
|
|
GENIEOS := solaris
|
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter SunOS,$(UNAME))),SunOS)
|
|
|
|
OS := solaris
|
|
|
|
GENIEOS := solaris
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := freebsd
|
2015-04-10 12:37:34 +02:00
|
|
|
GENIEOS := bsd
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := freebsd
|
2015-04-10 12:37:34 +02:00
|
|
|
GENIEOS := bsd
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := netbsd
|
2015-04-10 12:37:34 +02:00
|
|
|
GENIEOS := bsd
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := openbsd
|
2015-04-10 12:37:34 +02:00
|
|
|
GENIEOS := bsd
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := macosx
|
|
|
|
GENIEOS := darwin
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
|
2015-03-31 06:13:12 +02:00
|
|
|
OS := haiku
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
2015-08-25 05:01:38 +02:00
|
|
|
ifeq ($(firstword $(filter OS/2,$(UNAME))),OS/2)
|
|
|
|
OS := os2
|
|
|
|
GENIEOS := os2
|
|
|
|
endif
|
2015-03-29 15:17:21 +02:00
|
|
|
ifndef OS
|
|
|
|
$(error Unable to detect OS from uname -a: $(UNAME))
|
|
|
|
endif
|
2015-03-26 14:43:39 +01:00
|
|
|
endif
|
2007-12-17 16:19:59 +01:00
|
|
|
|
|
|
|
#-------------------------------------------------
|
2015-12-28 22:10:24 +01:00
|
|
|
# specify core target: mame, ldplayer
|
2015-12-31 10:51:15 +01:00
|
|
|
# specify subtarget: mame, arcade, mess, tiny, etc.
|
2015-12-28 22:10:24 +01:00
|
|
|
# build scripts will be run from
|
|
|
|
# scripts/target/$(TARGET)/$(SUBTARGET).lua
|
2007-12-17 16:19:59 +01:00
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
ifndef TARGET
|
2015-03-31 06:13:12 +02:00
|
|
|
TARGET := mame
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef SUBTARGET
|
2015-03-31 06:13:12 +02:00
|
|
|
SUBTARGET := $(TARGET)
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
CONFIG = release
|
|
|
|
ifdef DEBUG
|
2015-03-31 06:13:12 +02:00
|
|
|
CONFIG := debug
|
2008-02-22 01:17:36 +01:00
|
|
|
endif
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-04-02 15:45:49 +02:00
|
|
|
ifdef VERBOSE
|
|
|
|
MAKEPARAMS += verbose=1
|
|
|
|
else
|
|
|
|
SILENT := @
|
|
|
|
MAKEPARAMS += --no-print-directory
|
2015-03-26 09:00:39 +01:00
|
|
|
endif
|
2008-05-12 00:15:13 +02:00
|
|
|
|
2015-11-02 12:37:01 +01:00
|
|
|
ifndef BUILDDIR
|
|
|
|
BUILDDIR := build
|
|
|
|
endif
|
|
|
|
|
2007-12-17 16:19:59 +01:00
|
|
|
#-------------------------------------------------
|
|
|
|
# specify OS target, which further differentiates
|
|
|
|
# the underlying OS; supported values are:
|
|
|
|
# win32, unix, macosx, os2
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
ifndef TARGETOS
|
2010-01-16 05:40:55 +01:00
|
|
|
|
2015-03-29 15:17:21 +02:00
|
|
|
ifeq ($(OS),windows)
|
2015-03-31 06:13:12 +02:00
|
|
|
TARGETOS := windows
|
2015-03-26 09:00:39 +01:00
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x64
|
2015-03-26 09:00:39 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(PROCESSOR_ARCHITECTURE),x86)
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x64
|
2015-03-26 09:00:39 +01:00
|
|
|
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
|
2010-01-19 22:53:06 +01:00
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x86
|
2015-03-26 09:00:39 +01:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
UNAME := $(shell uname -mps)
|
|
|
|
TARGETOS := $(OS)
|
2010-01-15 23:05:00 +01:00
|
|
|
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x86
|
2015-03-26 09:00:39 +01:00
|
|
|
|
2010-01-15 23:05:00 +01:00
|
|
|
ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x64
|
2010-01-15 22:05:29 +01:00
|
|
|
endif
|
2010-01-20 02:18:35 +01:00
|
|
|
ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x64
|
2010-01-15 22:05:29 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64)
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x64
|
2010-01-16 14:02:03 +01:00
|
|
|
endif
|
|
|
|
endif
|
2010-01-16 05:40:55 +01:00
|
|
|
|
2015-03-29 03:29:22 +02:00
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
CROSS_BUILD := 1
|
2010-01-15 23:05:00 +01:00
|
|
|
endif # TARGET_OS
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-26 11:30:45 +01:00
|
|
|
ifdef PTR64
|
2015-03-27 08:16:44 +01:00
|
|
|
ifeq ($(PTR64),1)
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x64
|
2015-03-27 08:16:44 +01:00
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x86
|
2015-03-27 08:16:44 +01:00
|
|
|
endif
|
2015-03-26 11:30:45 +01:00
|
|
|
endif
|
|
|
|
|
2015-04-15 09:39:43 +02:00
|
|
|
ifeq ($(OS),windows)
|
|
|
|
ifeq ($(ARCHITECTURE),_x64)
|
|
|
|
WINDRES := $(MINGW64)/bin/windres
|
|
|
|
else
|
|
|
|
WINDRES := $(MINGW32)/bin/windres
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifeq ($(ARCHITECTURE),_x64)
|
|
|
|
WINDRES := x86_64-w64-mingw32-windres
|
|
|
|
else
|
|
|
|
WINDRES := i686-w64-mingw32-windres
|
|
|
|
endif
|
|
|
|
endif
|
2015-03-26 14:01:14 +01:00
|
|
|
|
2015-04-01 07:11:48 +02:00
|
|
|
ifeq ($(findstring arm,$(UNAME)),arm)
|
2015-07-16 22:54:34 +02:00
|
|
|
ARCHITECTURE :=
|
2015-04-01 07:11:48 +02:00
|
|
|
ifndef NOASM
|
|
|
|
NOASM := 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-06-20 22:42:30 +02:00
|
|
|
# Emscripten
|
|
|
|
ifeq ($(findstring emcc,$(CC)),emcc)
|
|
|
|
TARGETOS := asmjs
|
|
|
|
ARCHITECTURE :=
|
|
|
|
ifndef NOASM
|
|
|
|
NOASM := 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-04-02 13:22:19 +02:00
|
|
|
# Autodetect BIGENDIAN
|
|
|
|
# MacOSX
|
|
|
|
ifndef BIGENDIAN
|
|
|
|
ifneq (,$(findstring Power,$(UNAME)))
|
|
|
|
BIGENDIAN := 1
|
|
|
|
endif
|
|
|
|
# Linux
|
|
|
|
ifneq (,$(findstring ppc,$(UNAME)))
|
|
|
|
BIGENDIAN := 1
|
|
|
|
endif
|
|
|
|
endif # BIGENDIAN
|
|
|
|
|
2015-04-08 14:19:43 +02:00
|
|
|
ifndef PYTHON_EXECUTABLE
|
2015-04-08 16:24:07 +02:00
|
|
|
PYTHON := python
|
2015-04-08 14:19:43 +02:00
|
|
|
else
|
2015-04-08 16:24:07 +02:00
|
|
|
PYTHON := $(PYTHON_EXECUTABLE)
|
2015-04-08 14:19:43 +02:00
|
|
|
endif
|
2015-03-31 06:13:12 +02:00
|
|
|
CC := $(SILENT)gcc
|
|
|
|
LD := $(SILENT)g++
|
2016-02-15 12:05:31 +01:00
|
|
|
CXX:= $(SILENT)g++
|
2015-03-26 14:01:14 +01:00
|
|
|
|
2015-03-29 15:17:21 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# specify OSD layer: windows, sdl, etc.
|
2015-12-28 22:10:24 +01:00
|
|
|
# build scripts will be run from
|
|
|
|
# scripts/src/osd/$(OSD).lua
|
2015-03-29 15:17:21 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
ifndef OSD
|
|
|
|
|
2015-03-31 06:13:12 +02:00
|
|
|
OSD := osdmini
|
2015-03-29 15:17:21 +02:00
|
|
|
|
|
|
|
ifeq ($(TARGETOS),windows)
|
2015-03-31 06:13:12 +02:00
|
|
|
OSD := windows
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(TARGETOS),linux)
|
2015-03-31 06:13:12 +02:00
|
|
|
OSD := sdl
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
|
2015-04-10 12:37:34 +02:00
|
|
|
ifeq ($(TARGETOS),freebsd)
|
|
|
|
OSD := sdl
|
|
|
|
endif
|
|
|
|
|
2015-07-14 21:52:52 +02:00
|
|
|
ifeq ($(TARGETOS),netbsd)
|
|
|
|
OSD := sdl
|
|
|
|
endif
|
|
|
|
|
2015-04-10 12:37:34 +02:00
|
|
|
ifeq ($(TARGETOS),solaris)
|
|
|
|
OSD := sdl
|
|
|
|
endif
|
|
|
|
|
2015-03-29 15:17:21 +02:00
|
|
|
ifeq ($(TARGETOS),macosx)
|
2015-03-31 06:13:12 +02:00
|
|
|
OSD := sdl
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
2015-08-25 05:01:38 +02:00
|
|
|
|
|
|
|
ifeq ($(TARGETOS),os2)
|
|
|
|
OSD := sdl
|
|
|
|
endif
|
2015-11-21 10:40:59 +01:00
|
|
|
|
|
|
|
ifeq ($(TARGETOS),asmjs)
|
|
|
|
OSD := sdl
|
|
|
|
endif
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
|
2015-05-11 09:37:45 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# which 3rdparty library to build;
|
|
|
|
# link against system (common) library otherwise
|
|
|
|
#-------------------------------------------------
|
|
|
|
ifndef USE_SYSTEM_LIB_EXPAT
|
|
|
|
PARAMS += --with-bundled-expat
|
|
|
|
endif
|
2015-03-29 15:17:21 +02:00
|
|
|
|
2015-06-06 23:39:24 +02:00
|
|
|
ifndef USE_SYSTEM_LIB_ZLIB
|
|
|
|
PARAMS += --with-bundled-zlib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_SYSTEM_LIB_JPEG
|
|
|
|
PARAMS += --with-bundled-jpeg
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_SYSTEM_LIB_FLAC
|
|
|
|
PARAMS += --with-bundled-flac
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_SYSTEM_LIB_LUA
|
|
|
|
PARAMS += --with-bundled-lua
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_SYSTEM_LIB_SQLITE3
|
|
|
|
PARAMS += --with-bundled-sqlite3
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef USE_SYSTEM_LIB_PORTMIDI
|
|
|
|
PARAMS += --with-bundled-portmidi
|
|
|
|
endif
|
|
|
|
|
2015-07-05 22:08:10 +02:00
|
|
|
ifndef USE_SYSTEM_LIB_PORTAUDIO
|
|
|
|
PARAMS += --with-bundled-portaudio
|
|
|
|
endif
|
|
|
|
|
2015-03-26 14:01:14 +01:00
|
|
|
#-------------------------------------------------
|
|
|
|
# distribution may change things
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
ifeq ($(DISTRO),)
|
2015-03-31 06:13:12 +02:00
|
|
|
DISTRO := generic
|
2015-03-26 14:01:14 +01:00
|
|
|
else
|
|
|
|
ifeq ($(DISTRO),debian-stable)
|
|
|
|
else
|
|
|
|
$(error DISTRO $(DISTRO) unknown)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-03-26 14:47:10 +01:00
|
|
|
PARAMS+= --distro=$(DISTRO)
|
|
|
|
|
2015-03-27 15:11:41 +01:00
|
|
|
ifdef OVERRIDE_CC
|
2015-03-31 06:13:12 +02:00
|
|
|
PARAMS += --CC='$(OVERRIDE_CC)'
|
2015-03-29 03:29:22 +02:00
|
|
|
ifndef CROSS_BUILD
|
2015-03-31 06:13:12 +02:00
|
|
|
CC := $(OVERRIDE_CC)
|
2015-03-27 15:11:41 +01:00
|
|
|
endif
|
2015-03-29 03:29:22 +02:00
|
|
|
endif
|
2015-03-27 15:11:41 +01:00
|
|
|
ifdef OVERRIDE_CXX
|
2015-03-31 06:13:12 +02:00
|
|
|
PARAMS += --CXX='$(OVERRIDE_CXX)'
|
2015-03-29 03:29:22 +02:00
|
|
|
ifndef CROSS_BUILD
|
2015-03-31 06:13:12 +02:00
|
|
|
CXX := $(OVERRIDE_CXX)
|
2015-03-27 15:11:41 +01:00
|
|
|
endif
|
2015-03-29 03:29:22 +02:00
|
|
|
endif
|
2015-03-27 15:11:41 +01:00
|
|
|
ifdef OVERRIDE_LD
|
2015-03-31 06:13:12 +02:00
|
|
|
PARAMS += --LD='$(OVERRIDE_LD)'
|
2015-03-29 03:29:22 +02:00
|
|
|
ifndef CROSS_BUILD
|
2015-03-31 06:13:12 +02:00
|
|
|
LD := $(OVERRIDE_LD)
|
2015-03-27 15:11:41 +01:00
|
|
|
endif
|
2015-03-29 03:29:22 +02:00
|
|
|
endif
|
2015-03-27 15:11:41 +01:00
|
|
|
|
2015-03-26 15:45:59 +01:00
|
|
|
#-------------------------------------------------
|
|
|
|
# sanity check the configuration
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
# enable symbols as it is useless without them
|
|
|
|
ifdef SANITIZE
|
|
|
|
SYMBOLS = 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
# profiler defaults to on for DEBUG builds
|
|
|
|
ifdef DEBUG
|
|
|
|
ifndef PROFILER
|
|
|
|
PROFILER = 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# allow gprof profiling as well, which overrides the internal PROFILER
|
|
|
|
# also enable symbols as it is useless without them
|
|
|
|
ifdef PROFILE
|
|
|
|
PROFILER =
|
|
|
|
SYMBOLS = 1
|
|
|
|
ifndef SYMLEVEL
|
|
|
|
SYMLEVEL = 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# specify a default optimization level if none explicitly stated
|
|
|
|
ifndef OPTIMIZE
|
|
|
|
OPTIMIZE = 3
|
|
|
|
endif
|
|
|
|
|
|
|
|
# set the symbols level
|
|
|
|
ifdef SYMBOLS
|
|
|
|
ifndef SYMLEVEL
|
2016-01-20 08:48:42 +01:00
|
|
|
SYMLEVEL = 1
|
|
|
|
ifdef SOURCES
|
2015-03-26 15:45:59 +01:00
|
|
|
SYMLEVEL = 2
|
|
|
|
endif
|
|
|
|
endif
|
2016-01-20 08:48:42 +01:00
|
|
|
endif
|
2015-03-26 15:45:59 +01:00
|
|
|
|
2015-03-29 15:17:21 +02:00
|
|
|
ifdef TOOLS
|
2015-03-31 06:13:12 +02:00
|
|
|
PARAMS += --with-tools
|
2015-03-29 15:17:21 +02:00
|
|
|
endif
|
|
|
|
|
2015-05-27 15:02:33 +02:00
|
|
|
ifdef TESTS
|
|
|
|
PARAMS += --with-tests
|
|
|
|
endif
|
|
|
|
|
2016-01-29 11:47:40 +01:00
|
|
|
ifdef BENCHMARKS
|
|
|
|
PARAMS += --with-benchmarks
|
|
|
|
endif
|
|
|
|
|
2015-03-26 15:45:59 +01:00
|
|
|
ifdef SYMBOLS
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --SYMBOLS='$(SYMBOLS)'
|
2015-03-26 15:45:59 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SYMLEVEL
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --SYMLEVEL='$(SYMLEVEL)'
|
2015-03-26 15:45:59 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PROFILER
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --PROFILER='$(PROFILER)'
|
2015-03-26 15:45:59 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PROFILE
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --PROFILE='$(PROFILE)'
|
2015-03-26 15:45:59 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef OPTIMIZE
|
2015-03-31 06:13:12 +02:00
|
|
|
PARAMS += --OPTIMIZE=$(OPTIMIZE)
|
2015-03-26 15:45:59 +01:00
|
|
|
endif
|
|
|
|
|
2015-05-31 13:20:42 +02:00
|
|
|
ifdef SHLIB
|
|
|
|
PARAMS += --SHLIB=$(SHLIB)
|
|
|
|
endif
|
|
|
|
|
2015-03-26 15:45:59 +01:00
|
|
|
ifdef ARCHOPTS
|
2015-03-31 06:13:12 +02:00
|
|
|
PARAMS += --ARCHOPTS='$(ARCHOPTS)'
|
2015-03-26 15:45:59 +01:00
|
|
|
endif
|
|
|
|
|
2015-06-06 13:38:19 +02:00
|
|
|
ifdef OPT_FLAGS
|
|
|
|
PARAMS += --OPT_FLAGS='$(OPT_FLAGS)'
|
|
|
|
endif
|
|
|
|
|
2015-03-26 15:45:59 +01:00
|
|
|
ifdef MAP
|
2015-04-01 07:11:48 +02:00
|
|
|
PARAMS += --MAP='$(MAP)'
|
2015-03-26 15:45:59 +01:00
|
|
|
endif
|
|
|
|
|
2015-03-27 17:19:57 +01:00
|
|
|
ifdef USE_BGFX
|
2015-04-01 07:11:48 +02:00
|
|
|
PARAMS += --USE_BGFX='$(USE_BGFX)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NOASM
|
|
|
|
PARAMS += --NOASM='$(NOASM)'
|
|
|
|
endif
|
|
|
|
|
2015-04-02 13:22:19 +02:00
|
|
|
ifdef BIGENDIAN
|
|
|
|
PARAMS += --BIGENDIAN='$(BIGENDIAN)'
|
|
|
|
endif
|
|
|
|
|
2015-04-01 07:11:48 +02:00
|
|
|
ifdef FORCE_DRC_C_BACKEND
|
|
|
|
PARAMS += --FORCE_DRC_C_BACKEND='$(FORCE_DRC_C_BACKEND)'
|
2015-03-27 17:19:57 +01:00
|
|
|
endif
|
2015-03-28 07:03:44 +01:00
|
|
|
|
|
|
|
ifdef NOWERROR
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --NOWERROR='$(NOWERROR)'
|
2015-03-28 07:03:44 +01:00
|
|
|
endif
|
|
|
|
|
2015-03-28 12:50:15 +01:00
|
|
|
ifdef TARGET
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --target='$(TARGET)'
|
2015-03-28 12:50:15 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SUBTARGET
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --subtarget='$(SUBTARGET)'
|
2015-03-28 12:50:15 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef OSD
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --osd='$(OSD)'
|
2015-03-28 12:50:15 +01:00
|
|
|
endif
|
|
|
|
|
2015-11-02 12:37:01 +01:00
|
|
|
ifdef BUILDDIR
|
|
|
|
PARAMS += --build-dir='$(BUILDDIR)'
|
|
|
|
endif
|
|
|
|
|
2015-03-28 12:50:15 +01:00
|
|
|
ifdef TARGETOS
|
2015-04-02 13:22:19 +02:00
|
|
|
PARAMS += --targetos='$(TARGETOS)'
|
2015-03-28 12:50:15 +01:00
|
|
|
endif
|
|
|
|
|
2015-03-31 18:44:38 +02:00
|
|
|
ifdef DONT_USE_NETWORK
|
|
|
|
PARAMS += --DONT_USE_NETWORK='$(DONT_USE_NETWORK)'
|
|
|
|
endif
|
|
|
|
|
2015-03-31 15:41:59 +02:00
|
|
|
ifdef NO_OPENGL
|
|
|
|
PARAMS += --NO_OPENGL='$(NO_OPENGL)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef USE_DISPATCH_GL
|
|
|
|
PARAMS += --USE_DISPATCH_GL='$(USE_DISPATCH_GL)'
|
|
|
|
endif
|
|
|
|
|
2015-03-31 22:29:40 +02:00
|
|
|
ifdef NO_USE_MIDI
|
|
|
|
PARAMS += --NO_USE_MIDI='$(NO_USE_MIDI)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef USE_QTDEBUG
|
|
|
|
PARAMS += --USE_QTDEBUG='$(USE_QTDEBUG)'
|
|
|
|
endif
|
|
|
|
|
2016-01-20 00:38:14 +01:00
|
|
|
ifdef MODERN_WIN_API
|
|
|
|
PARAMS += --MODERN_WIN_API='$(MODERN_WIN_API)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef USE_XAUDIO2
|
|
|
|
PARAMS += --USE_XAUDIO2='$(USE_XAUDIO2)'
|
|
|
|
endif
|
|
|
|
|
2015-04-01 00:49:08 +02:00
|
|
|
ifdef DIRECTINPUT
|
|
|
|
PARAMS += --DIRECTINPUT='$(DIRECTINPUT)'
|
|
|
|
endif
|
|
|
|
|
2015-04-04 05:53:47 +02:00
|
|
|
ifdef USE_SDL
|
|
|
|
PARAMS += --USE_SDL='$(USE_SDL)'
|
|
|
|
endif
|
|
|
|
|
2015-06-06 16:32:04 +02:00
|
|
|
ifdef SDL_INI_PATH
|
|
|
|
PARAMS += --SDL_INI_PATH='$(SDL_INI_PATH)'
|
|
|
|
endif
|
|
|
|
|
2015-04-04 05:53:47 +02:00
|
|
|
ifdef CYGWIN_BUILD
|
|
|
|
PARAMS += --CYGWIN_BUILD='$(CYGWIN_BUILD)'
|
|
|
|
endif
|
|
|
|
|
2015-03-31 16:00:23 +02:00
|
|
|
ifdef MESA_INSTALL_ROOT
|
|
|
|
PARAMS += --MESA_INSTALL_ROOT='$(MESA_INSTALL_ROOT)'
|
|
|
|
endif
|
|
|
|
|
2015-03-31 09:34:57 +02:00
|
|
|
ifdef NO_X11
|
|
|
|
PARAMS += --NO_X11='$(NO_X11)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NO_USE_XINPUT
|
|
|
|
PARAMS += --NO_USE_XINPUT='$(NO_USE_XINPUT)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SDL_LIBVER
|
|
|
|
PARAMS += --SDL_LIBVER='$(SDL_LIBVER)'
|
|
|
|
endif
|
|
|
|
|
2015-03-31 18:02:58 +02:00
|
|
|
ifdef SDL2_MULTIAPI
|
|
|
|
PARAMS += --SDL2_MULTIAPI='$(SDL2_MULTIAPI)'
|
|
|
|
endif
|
|
|
|
|
2015-03-31 09:34:57 +02:00
|
|
|
ifdef SDL_INSTALL_ROOT
|
|
|
|
PARAMS += --SDL_INSTALL_ROOT='$(SDL_INSTALL_ROOT)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SDL_FRAMEWORK_PATH
|
|
|
|
PARAMS += --SDL_FRAMEWORK_PATH='$(SDL_FRAMEWORK_PATH)'
|
|
|
|
endif
|
|
|
|
|
2015-12-09 16:41:34 +01:00
|
|
|
ifdef USE_LIBSDL
|
|
|
|
PARAMS += --USE_LIBSDL='$(USE_LIBSDL)'
|
2015-03-31 09:34:57 +02:00
|
|
|
endif
|
|
|
|
|
2015-03-29 18:58:39 +02:00
|
|
|
ifdef LDOPTS
|
2015-03-31 06:13:12 +02:00
|
|
|
PARAMS += --LDOPTS='$(LDOPTS)'
|
2015-03-29 18:58:39 +02:00
|
|
|
endif
|
|
|
|
|
2015-04-06 16:27:14 +02:00
|
|
|
ifdef LTO
|
|
|
|
PARAMS += --LTO='$(LTO)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef DEPRECATED
|
|
|
|
PARAMS += --DEPRECATED='$(DEPRECATED)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SSE2
|
|
|
|
PARAMS += --SSE2='$(SSE2)'
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef OPENMP
|
|
|
|
PARAMS += --OPENMP='$(OPENMP)'
|
|
|
|
endif
|
|
|
|
|
2015-04-06 16:33:21 +02:00
|
|
|
ifdef FASTDEBUG
|
|
|
|
PARAMS += --FASTDEBUG='$(FASTDEBUG)'
|
|
|
|
endif
|
|
|
|
|
2015-04-08 08:52:02 +02:00
|
|
|
ifdef SEPARATE_BIN
|
|
|
|
PARAMS += --SEPARATE_BIN='$(SEPARATE_BIN)'
|
|
|
|
endif
|
2015-04-07 13:23:31 +02:00
|
|
|
|
2015-04-08 14:19:43 +02:00
|
|
|
ifdef PYTHON_EXECUTABLE
|
|
|
|
PARAMS += --PYTHON_EXECUTABLE='$(PYTHON_EXECUTABLE)'
|
|
|
|
endif
|
|
|
|
|
2015-04-11 08:46:02 +02:00
|
|
|
ifdef SHADOW_CHECK
|
|
|
|
PARAMS += --SHADOW_CHECK='$(SHADOW_CHECK)'
|
|
|
|
endif
|
|
|
|
|
2015-04-22 14:23:49 +02:00
|
|
|
ifdef STRIP_SYMBOLS
|
|
|
|
PARAMS += --STRIP_SYMBOLS='$(STRIP_SYMBOLS)'
|
2015-04-19 16:21:36 +02:00
|
|
|
endif
|
|
|
|
|
2015-04-13 18:47:33 +02:00
|
|
|
ifdef QT_HOME
|
|
|
|
PARAMS += --QT_HOME='$(QT_HOME)'
|
|
|
|
endif
|
|
|
|
|
2015-10-09 14:13:35 +02:00
|
|
|
ifdef SOURCES
|
|
|
|
PARAMS += --SOURCES='$(SOURCES)'
|
2015-06-20 18:20:10 +02:00
|
|
|
endif
|
|
|
|
|
2015-09-05 11:53:19 +02:00
|
|
|
ifdef FORCE_VERSION_COMPILE
|
|
|
|
PARAMS += --FORCE_VERSION_COMPILE='$(FORCE_VERSION_COMPILE)'
|
|
|
|
endif
|
|
|
|
|
2015-12-27 15:35:29 +01:00
|
|
|
ifdef PLATFORM
|
|
|
|
PARAMS += --PLATFORM='$(PLATFORM)'
|
|
|
|
endif
|
|
|
|
|
2015-03-30 00:50:56 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# All scripts
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
|
2015-03-30 00:50:56 +02:00
|
|
|
SCRIPTS = scripts/genie.lua \
|
|
|
|
scripts/src/lib.lua \
|
|
|
|
scripts/src/emu.lua \
|
|
|
|
scripts/src/machine.lua \
|
|
|
|
scripts/src/main.lua \
|
|
|
|
scripts/src/3rdparty.lua \
|
|
|
|
scripts/src/cpu.lua \
|
2015-04-04 16:46:12 +02:00
|
|
|
scripts/src/osd/modules.lua \
|
2015-03-30 05:19:54 +02:00
|
|
|
$(wildcard scripts/src/osd/$(OSD)*.lua) \
|
2015-03-30 00:50:56 +02:00
|
|
|
scripts/src/sound.lua \
|
|
|
|
scripts/src/tools.lua \
|
2015-05-27 15:02:33 +02:00
|
|
|
scripts/src/tests.lua \
|
2016-01-29 11:47:40 +01:00
|
|
|
scripts/src/benchmarks.lua \
|
2015-03-30 00:50:56 +02:00
|
|
|
scripts/src/video.lua \
|
|
|
|
scripts/src/bus.lua \
|
|
|
|
scripts/src/netlist.lua \
|
|
|
|
scripts/toolchain.lua \
|
2015-04-04 16:42:58 +02:00
|
|
|
scripts/src/osd/modules.lua \
|
2015-03-30 09:29:59 +02:00
|
|
|
$(wildcard src/osd/$(OSD)/$(OSD).mak) \
|
|
|
|
$(wildcard src/$(TARGET)/$(SUBTARGET).mak)
|
2015-06-20 18:20:10 +02:00
|
|
|
|
2015-12-31 10:51:15 +01:00
|
|
|
ifeq ($(SUBTARGET),mame)
|
|
|
|
SCRIPTS += scripts/target/$(TARGET)/arcade.lua
|
|
|
|
SCRIPTS += scripts/target/$(TARGET)/mess.lua
|
|
|
|
endif
|
|
|
|
|
2015-10-09 14:13:35 +02:00
|
|
|
ifndef SOURCES
|
2015-06-20 18:20:10 +02:00
|
|
|
SCRIPTS += scripts/target/$(TARGET)/$(SUBTARGET).lua
|
|
|
|
endif
|
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
ifdef REGENIE
|
|
|
|
SCRIPTS+= regenie
|
|
|
|
endif
|
2015-03-30 00:50:56 +02:00
|
|
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
# Dependent stuff
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2007-12-17 16:19:59 +01:00
|
|
|
# extension for executables
|
2015-03-31 06:13:12 +02:00
|
|
|
EXE :=
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-29 03:29:22 +02:00
|
|
|
ifeq ($(OS),windows)
|
2015-03-31 06:13:12 +02:00
|
|
|
EXE := .exe
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-03-29 03:29:22 +02:00
|
|
|
ifeq ($(OS),os2)
|
2015-03-31 06:13:12 +02:00
|
|
|
EXE := .exe
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
SHELLTYPE := msdos
|
|
|
|
ifeq (,$(ComSpec)$(COMSPEC))
|
|
|
|
SHELLTYPE := posix
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifeq (/bin,$(findstring /bin,$(SHELL)))
|
|
|
|
SHELLTYPE := posix
|
2009-02-28 23:10:06 +01:00
|
|
|
endif
|
2015-08-25 05:01:38 +02:00
|
|
|
ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
|
|
|
|
SHELLTYPE := posix
|
|
|
|
endif
|
2009-02-28 23:10:06 +01:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
ifeq (posix,$(SHELLTYPE))
|
|
|
|
MKDIR = $(SILENT) mkdir -p "$(1)"
|
|
|
|
COPY = $(SILENT) cp -fR "$(1)" "$(2)"
|
2007-12-17 16:19:59 +01:00
|
|
|
else
|
2015-03-26 09:00:39 +01:00
|
|
|
MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
|
|
|
|
COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
|
|
|
|
2015-11-02 12:37:01 +01:00
|
|
|
GENDIR = $(BUILDDIR)/generated
|
2007-12-17 16:19:59 +01:00
|
|
|
|
|
|
|
# all sources are under the src/ directory
|
|
|
|
SRC = src
|
|
|
|
|
2015-01-10 11:51:23 +01:00
|
|
|
# all 3rd party sources are under the 3rdparty/ directory
|
|
|
|
3RDPARTY = 3rdparty
|
2016-01-01 07:56:20 +01:00
|
|
|
ifeq ($(SUBTARGET),mame)
|
|
|
|
PROJECT_NAME := $(SUBTARGET)
|
|
|
|
else ifeq ($(SUBTARGET),mess)
|
|
|
|
PROJECT_NAME := $(SUBTARGET)
|
|
|
|
else
|
|
|
|
PROJECT_NAME := $(TARGET)$(SUBTARGET)
|
|
|
|
endif
|
|
|
|
|
2015-01-10 11:51:23 +01:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
ifeq ($(OS),windows)
|
2016-01-01 12:27:34 +01:00
|
|
|
ifeq (posix,$(SHELLTYPE))
|
|
|
|
GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
|
|
|
|
CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> /dev/null| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
|
|
|
|
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
|
|
|
|
else
|
2015-12-07 11:38:16 +01:00
|
|
|
GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> NUL)
|
2015-12-07 13:31:06 +01:00
|
|
|
CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> NUL| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
|
2015-04-08 14:19:43 +02:00
|
|
|
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > NUL 2>&1 && echo python)
|
2016-01-01 12:27:34 +01:00
|
|
|
endif
|
2015-11-23 10:01:21 +01:00
|
|
|
ifdef MSBUILD
|
2015-12-07 11:30:31 +01:00
|
|
|
MSBUILD_PARAMS := /v:minimal /m:$(NUMBER_OF_PROCESSORS)
|
2015-11-23 10:01:21 +01:00
|
|
|
ifeq ($(CONFIG),debug)
|
|
|
|
MSBUILD_PARAMS += /p:Configuration=Debug
|
|
|
|
else
|
|
|
|
MSBUILD_PARAMS += /p:Configuration=Release
|
|
|
|
endif
|
|
|
|
ifeq ($(ARCHITECTURE),_x64)
|
|
|
|
MSBUILD_PARAMS += /p:Platform=x64
|
|
|
|
else
|
|
|
|
MSBUILD_PARAMS += /p:Platform=win32
|
|
|
|
endif
|
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
|
2015-04-10 12:37:34 +02:00
|
|
|
ifneq ($(OS),solaris)
|
2015-12-07 11:30:31 +01:00
|
|
|
CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\.[0-9]\(\.[0-9]\)\?' -o | grep -e '[0-9]\.[0-9]\(\.[0-9]\)\?' -o | tail -n 1)
|
2015-04-10 12:37:34 +02:00
|
|
|
endif
|
2015-04-08 14:19:43 +02:00
|
|
|
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
|
2015-03-26 19:07:46 +01:00
|
|
|
endif
|
2015-12-07 11:30:31 +01:00
|
|
|
ifeq ($(CLANG_VERSION),)
|
|
|
|
$(info GCC $(GCC_VERSION) detected)
|
|
|
|
else
|
|
|
|
$(info Clang $(CLANG_VERSION) detected)
|
2015-03-29 19:10:34 +02:00
|
|
|
ifeq ($(ARCHITECTURE),_x64)
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x64_clang
|
2015-03-26 19:07:46 +01:00
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
ARCHITECTURE := _x86_clang
|
2015-03-26 19:07:46 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
endif
|
2015-04-08 16:24:07 +02:00
|
|
|
ifneq ($(PYTHON_AVAILABLE),python)
|
|
|
|
$(error Python is not available in path)
|
|
|
|
endif
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-31 06:13:12 +02:00
|
|
|
GENIE := 3rdparty/genie/bin/$(GENIEOS)/genie$(EXE)
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-27 08:06:15 +01:00
|
|
|
ifeq ($(TARGET),$(SUBTARGET))
|
2015-03-31 06:13:12 +02:00
|
|
|
SUBDIR := $(OSD)/$(TARGET)
|
2015-03-27 08:06:15 +01:00
|
|
|
else
|
2015-03-31 06:13:12 +02:00
|
|
|
SUBDIR := $(OSD)/$(TARGET)$(SUBTARGET)
|
2015-03-27 08:06:15 +01:00
|
|
|
endif
|
2015-11-02 12:37:01 +01:00
|
|
|
PROJECTDIR := $(BUILDDIR)/projects/$(SUBDIR)
|
2015-03-27 08:06:15 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: all clean regenie generate
|
2015-03-29 15:17:21 +02:00
|
|
|
all: $(GENIE) $(TARGETOS)$(ARCHITECTURE)
|
2015-03-30 05:19:54 +02:00
|
|
|
regenie:
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-mingw64-gcc
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2015-03-30 14:37:10 +02:00
|
|
|
$(PROJECTDIR)/gmake-mingw64-gcc/Makefile: makefile $(SCRIPTS) $(GENIE)
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef MINGW64
|
|
|
|
$(error MINGW64 is not set)
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-04-08 16:24:07 +02:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=mingw64-gcc --gcc_version=$(GCC_VERSION) gmake
|
2015-03-30 05:19:54 +02:00
|
|
|
|
|
|
|
.PHONY: windows_x64
|
|
|
|
windows_x64: generate $(PROJECTDIR)/gmake-mingw64-gcc/Makefile
|
2016-01-02 19:01:25 +01:00
|
|
|
ifndef MINGW64
|
|
|
|
$(error MINGW64 is not set)
|
|
|
|
endif
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw64-gcc config=$(CONFIG)64 WINDRES=$(WINDRES) precompile
|
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw64-gcc config=$(CONFIG)64 WINDRES=$(WINDRES)
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-mingw32-gcc
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
.PHONY: windows
|
2015-03-29 15:17:21 +02:00
|
|
|
windows: windows_x86
|
|
|
|
|
2015-03-30 14:37:10 +02:00
|
|
|
$(PROJECTDIR)/gmake-mingw32-gcc/Makefile: makefile $(SCRIPTS) $(GENIE)
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef MINGW32
|
|
|
|
$(error MINGW32 is not set)
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=mingw32-gcc --gcc_version=$(GCC_VERSION) gmake
|
2015-03-30 05:19:54 +02:00
|
|
|
|
|
|
|
.PHONY: windows_x86
|
|
|
|
windows_x86: generate $(PROJECTDIR)/gmake-mingw32-gcc/Makefile
|
2016-01-02 19:01:25 +01:00
|
|
|
ifndef MINGW32
|
|
|
|
$(error MINGW32 is not set)
|
|
|
|
endif
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw32-gcc config=$(CONFIG)32 WINDRES=$(WINDRES) precompile
|
2015-04-15 09:39:43 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw32-gcc config=$(CONFIG)32 WINDRES=$(WINDRES)
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-mingw-clang
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2015-03-30 14:37:10 +02:00
|
|
|
$(PROJECTDIR)/gmake-mingw-clang/Makefile: makefile $(SCRIPTS) $(GENIE)
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=mingw-clang --gcc_version=$(CLANG_VERSION) gmake
|
2015-03-30 05:19:54 +02:00
|
|
|
|
|
|
|
.PHONY: windows_x64_clang
|
|
|
|
windows_x64_clang: generate $(PROJECTDIR)/gmake-mingw-clang/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)64 WINDRES=$(WINDRES) precompile
|
2015-04-15 09:39:43 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)64 WINDRES=$(WINDRES)
|
2015-04-08 16:24:07 +02:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: windows_x86_clang
|
|
|
|
windows_x86_clang: generate $(PROJECTDIR)/gmake-mingw-clang/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)32 WINDRES=$(WINDRES) precompile
|
2015-04-15 09:39:43 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-mingw-clang config=$(CONFIG)32 WINDRES=$(WINDRES)
|
2012-03-29 23:56:18 +02:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
vs2013: generate
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) vs2013
|
2015-11-23 10:01:21 +01:00
|
|
|
ifdef MSBUILD
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) msbuild $(PROJECTDIR)/vs2013/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
2015-11-23 10:01:21 +01:00
|
|
|
endif
|
2007-12-17 17:37:57 +01:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
vs2013_intel: generate
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=intel-15 vs2013
|
2015-11-23 10:01:21 +01:00
|
|
|
ifdef MSBUILD
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) msbuild $(PROJECTDIR)/vs2013-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
2015-11-23 10:01:21 +01:00
|
|
|
endif
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
vs2013_xp: generate
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-xp vs2013
|
2015-11-23 10:01:21 +01:00
|
|
|
ifdef MSBUILD
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) msbuild $(PROJECTDIR)/vs2013-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
2015-11-23 10:01:21 +01:00
|
|
|
endif
|
2015-01-08 10:21:18 +01:00
|
|
|
|
2015-04-06 18:50:42 +02:00
|
|
|
vs2013_clang: generate
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=vs2013-clang vs2013
|
|
|
|
|
2015-05-28 20:06:33 +02:00
|
|
|
vs2013_winrt: generate
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=winstore81 vs2013
|
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
vs2015: generate
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) vs2015
|
2015-11-23 10:01:21 +01:00
|
|
|
ifdef MSBUILD
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) msbuild $(PROJECTDIR)/vs2015/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
2015-11-23 10:01:21 +01:00
|
|
|
endif
|
2008-04-02 10:28:58 +02:00
|
|
|
|
2015-11-14 11:52:15 +01:00
|
|
|
vs2015_intel: generate
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=intel-15 vs2015
|
2015-11-23 10:01:21 +01:00
|
|
|
ifdef MSBUILD
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) msbuild $(PROJECTDIR)/vs2015-intel/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
2015-11-23 10:01:21 +01:00
|
|
|
endif
|
2015-11-14 11:52:15 +01:00
|
|
|
|
|
|
|
vs2015_xp: generate
|
2015-11-23 10:01:21 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=vs2015-xp vs2015
|
|
|
|
ifdef MSBUILD
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) msbuild $(PROJECTDIR)/vs2015-xp/$(PROJECT_NAME).sln $(MSBUILD_PARAMS)
|
2015-11-23 10:01:21 +01:00
|
|
|
endif
|
2015-11-14 11:52:15 +01:00
|
|
|
|
|
|
|
vs2015_clang: generate
|
2015-11-23 10:01:21 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=vs2015-clang vs2015
|
2015-11-14 11:52:15 +01:00
|
|
|
|
|
|
|
vs2015_winrt: generate
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --vs=winstore81 vs2015
|
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
android-arm: generate
|
|
|
|
ifndef ANDROID_NDK_ARM
|
|
|
|
$(error ANDROID_NDK_ARM is not set)
|
2013-08-22 11:40:15 +02:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef ANDROID_NDK_ROOT
|
|
|
|
$(error ANDROID_NDK_ROOT is not set)
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-arm --gcc_version=4.8 gmake
|
2010-01-13 04:49:37 +01:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-arm config=$(CONFIG)
|
ioport.c C++ conversion. Mostly internal changes, with no
intended differences from previous behavior. For drivers,
the main change is that input_port_read() no longer exists.
Instead, the port must be fetched from the appropriate device,
and then read() is called.
For member functions, this is actually simpler/cleaner:
value = ioport("tag")->read()
For legacy functions which have a driver_data state, it goes:
value = state->ioport("tag")->read()
For other legacy functions, they need to fetch the root device:
value = machine.root_device().ioport("tag")->read()
The other big change for drivers is that IPT_VBLANK is gone.
Instead, it has been replaced by a device line callback on the
screen device. There's a new macro PORT_VBLANK("tag") which
automatically points things to the right spot.
Here's a set of imperfect search & replace strings to convert
the input_port_read calls and fix up IPT_VBLANK:
input_port_read( *\( *)(machine\(\)) *, *([^)]+ *\))
ioport\1\3->read\(\)
input_port_read( *\( *)(.*machine[()]*) *, *([^)]+ *\))
\2\.root_device\(\)\.ioport\1\3->read\(\)
(state = .*driver_data[^}]+)space->machine\(\)\.root_device\(\)\.
\1state->
(state = .*driver_data[^}]+)device->machine\(\)\.root_device\(\)\.
\1state->
input_port_read_safe( *\( *)(machine\(\)) *, *([^,]+), *([^)]+\))
ioport\1\3->read_safe\(\4\)
IPT_VBLANK( *\))
IPT_CUSTOM\1 PORT_VBLANK("screen")
2012-05-03 11:00:08 +02:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
android-mips: generate
|
|
|
|
ifndef ANDROID_NDK_MIPS
|
|
|
|
$(error ANDROID_NDK_MIPS is not set)
|
2013-08-02 11:48:25 +02:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef ANDROID_NDK_ROOT
|
|
|
|
$(error ANDROID_NDK_ROOT is not set)
|
2010-01-13 04:49:37 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-mips --gcc_version=4.8 gmake
|
2014-04-07 11:28:49 +02:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-mips config=$(CONFIG)
|
2014-04-07 11:28:49 +02:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
android-x86: generate
|
|
|
|
ifndef ANDROID_NDK_X86
|
|
|
|
$(error ANDROID_NDK_X86 is not set)
|
2014-10-01 11:17:09 +02:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef ANDROID_NDK_ROOT
|
|
|
|
$(error ANDROID_NDK_ROOT is not set)
|
2013-05-04 11:54:42 +02:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=android-x86 --gcc_version=4.8 gmake
|
2013-05-04 11:48:04 +02:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-android-x86 config=$(CONFIG)
|
2010-06-12 01:07:16 +02:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
asmjs: generate
|
|
|
|
ifndef EMSCRIPTEN
|
|
|
|
$(error EMSCRIPTEN is not set)
|
2010-02-14 18:44:34 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-12-19 09:17:34 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=asmjs --gcc_version=4.9 gmake
|
2010-02-14 18:44:34 +01:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-asmjs config=$(CONFIG)
|
2010-02-14 18:44:34 +01:00
|
|
|
|
2015-03-29 15:17:21 +02:00
|
|
|
|
|
|
|
nacl: nacl_x86
|
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
nacl_x64: generate
|
|
|
|
ifndef NACL_SDK_ROOT
|
|
|
|
$(error NACL_SDK_ROOT is not set)
|
2010-01-13 04:49:37 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=nacl --gcc_version=4.8 gmake
|
2010-01-13 04:49:37 +01:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-nacl config=$(CONFIG)64
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
nacl_x86: generate
|
|
|
|
ifndef NACL_SDK_ROOT
|
|
|
|
$(error NACL_SDK_ROOT is not set)
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=nacl --gcc_version=4.8 gmake
|
2015-03-26 09:00:39 +01:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-nacl config=$(CONFIG)32
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
nacl-arm: generate
|
|
|
|
ifndef NACL_SDK_ROOT
|
|
|
|
$(error NACL_SDK_ROOT is not set)
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=nacl-arm --gcc_version=4.8 gmake
|
2007-12-17 16:19:59 +01:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-nacl-arm config=$(CONFIG)
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
pnacl: generate
|
|
|
|
ifndef NACL_SDK_ROOT
|
|
|
|
$(error NACL_SDK_ROOT is not set)
|
2013-08-02 11:48:25 +02:00
|
|
|
endif
|
2015-03-26 09:00:39 +01:00
|
|
|
ifndef COMPILE
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=pnacl --gcc_version=4.8 gmake
|
2013-08-02 11:48:25 +02:00
|
|
|
endif
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-pnacl config=$(CONFIG)
|
2013-08-02 11:48:25 +02:00
|
|
|
|
2015-03-30 00:50:56 +02:00
|
|
|
#-------------------------------------------------
|
2015-03-30 05:19:54 +02:00
|
|
|
# gmake-linux
|
2015-03-30 00:50:56 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
|
2015-03-30 14:37:10 +02:00
|
|
|
$(PROJECTDIR)/gmake-linux/Makefile: makefile $(SCRIPTS) $(GENIE)
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=linux-gcc --gcc_version=$(GCC_VERSION) gmake
|
2015-03-30 00:50:56 +02:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: linux_x64
|
2015-03-30 00:50:56 +02:00
|
|
|
linux_x64: generate $(PROJECTDIR)/gmake-linux/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)64
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: linux_x86
|
2015-03-30 00:50:56 +02:00
|
|
|
linux_x86: generate $(PROJECTDIR)/gmake-linux/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)32
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-07-16 22:54:34 +02:00
|
|
|
.PHONY: linux
|
|
|
|
linux: generate $(PROJECTDIR)/gmake-linux/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG) precompile
|
2015-07-16 22:54:34 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux config=$(CONFIG)
|
|
|
|
|
2015-03-30 00:50:56 +02:00
|
|
|
#-------------------------------------------------
|
2015-03-30 05:19:54 +02:00
|
|
|
# gmake-linux-clang
|
2015-03-30 00:50:56 +02:00
|
|
|
#-------------------------------------------------
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 14:37:10 +02:00
|
|
|
$(PROJECTDIR)/gmake-linux-clang/Makefile: makefile $(SCRIPTS) $(GENIE)
|
2015-03-28 12:50:15 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=linux-clang --gcc_version=$(CLANG_VERSION) gmake
|
2015-03-30 00:50:56 +02:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: linux_x64_clang
|
2015-03-30 00:50:56 +02:00
|
|
|
linux_x64_clang: generate $(PROJECTDIR)/gmake-linux-clang/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)64 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)64
|
2015-03-30 00:50:56 +02:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: linux_x86_clang
|
2015-03-30 00:50:56 +02:00
|
|
|
linux_x86_clang: generate $(PROJECTDIR)/gmake-linux-clang/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)32 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-linux-clang config=$(CONFIG)32
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-osx
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2015-03-30 14:37:10 +02:00
|
|
|
$(PROJECTDIR)/gmake-osx/Makefile: makefile $(SCRIPTS) $(GENIE)
|
2015-04-03 15:30:56 +02:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=osx --gcc_version=$(GCC_VERSION) gmake
|
2015-03-30 05:19:54 +02:00
|
|
|
|
|
|
|
.PHONY: macosx_x64
|
|
|
|
macosx_x64: generate $(PROJECTDIR)/gmake-osx/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)64 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)64
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: macosx
|
2015-03-29 15:17:21 +02:00
|
|
|
macosx: macosx_x86
|
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
.PHONY: macosx_x86
|
|
|
|
macosx_x86: generate $(PROJECTDIR)/gmake-osx/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)32 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx config=$(CONFIG)32
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-osx-clang
|
|
|
|
#-------------------------------------------------
|
2015-03-26 19:07:46 +01:00
|
|
|
|
2015-03-30 14:37:10 +02:00
|
|
|
$(PROJECTDIR)/gmake-osx-clang/Makefile: makefile $(SCRIPTS) $(GENIE)
|
2015-04-03 15:30:56 +02:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=osx-clang --gcc_version=$(CLANG_VERSION) gmake
|
2015-03-30 05:19:54 +02:00
|
|
|
|
|
|
|
.PHONY: macosx_x64_clang
|
|
|
|
macosx_x64_clang: generate $(PROJECTDIR)/gmake-osx-clang/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)64 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)64
|
2015-03-30 05:19:54 +02:00
|
|
|
|
|
|
|
.PHONY: macosx_x86_clang
|
|
|
|
macosx_x86_clang: generate $(PROJECTDIR)/gmake-osx-clang/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)32 precompile
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-osx-clang config=$(CONFIG)32
|
2015-03-26 19:07:46 +01:00
|
|
|
|
2015-04-02 18:16:20 +02:00
|
|
|
xcode4: generate
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --targetos=macosx --xcode=osx xcode4
|
|
|
|
|
|
|
|
xcode4-ios: generate
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --targetos=macosx --xcode=ios xcode4
|
|
|
|
|
2015-04-10 12:37:34 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-solaris
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECTDIR)/gmake-solaris/Makefile: makefile $(SCRIPTS) $(GENIE)
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=solaris --gcc_version=$(GCC_VERSION) gmake
|
|
|
|
|
|
|
|
.PHONY: solaris_x64
|
|
|
|
solaris_x64: generate $(PROJECTDIR)/gmake-solaris/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-solaris config=$(CONFIG)64 precompile
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-solaris config=$(CONFIG)64
|
|
|
|
|
|
|
|
.PHONY: solaris
|
|
|
|
solaris: solaris_x86
|
|
|
|
|
|
|
|
.PHONY: solaris_x86
|
|
|
|
solaris_x86: generate $(PROJECTDIR)/gmake-solaris/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-solaris config=$(CONFIG)32 precompile
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-solaris config=$(CONFIG)32
|
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-freebsd
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECTDIR)/gmake-freebsd/Makefile: makefile $(SCRIPTS) $(GENIE)
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=freebsd --gcc_version=$(GCC_VERSION) gmake
|
|
|
|
|
|
|
|
.PHONY: freebsd_x64
|
|
|
|
freebsd_x64: generate $(PROJECTDIR)/gmake-freebsd/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-freebsd config=$(CONFIG)64 precompile
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-freebsd config=$(CONFIG)64
|
|
|
|
|
|
|
|
.PHONY: freebsd
|
|
|
|
freebsd: freebsd_x86
|
|
|
|
|
|
|
|
.PHONY: freebsd_x86
|
|
|
|
freebsd_x86: generate $(PROJECTDIR)/gmake-freebsd/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-freebsd config=$(CONFIG)32 precompile
|
2015-04-10 12:37:34 +02:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-freebsd config=$(CONFIG)32
|
|
|
|
|
2015-04-02 18:16:20 +02:00
|
|
|
|
2015-07-14 21:52:52 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-netbsd
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECTDIR)/gmake-netbsd/Makefile: makefile $(SCRIPTS) $(GENIE)
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=netbsd --gcc_version=$(GCC_VERSION) gmake
|
|
|
|
|
|
|
|
.PHONY: netbsd_x64
|
|
|
|
netbsd_x64: generate $(PROJECTDIR)/gmake-netbsd/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)64 precompile
|
2015-07-14 21:52:52 +02:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)64
|
|
|
|
|
|
|
|
.PHONY: netbsd
|
|
|
|
netbsd: netbsd_x86
|
|
|
|
|
|
|
|
.PHONY: netbsd_x86
|
|
|
|
netbsd_x86: generate $(PROJECTDIR)/gmake-netbsd/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)32 precompile
|
2015-07-14 21:52:52 +02:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-netbsd config=$(CONFIG)32
|
|
|
|
|
|
|
|
|
2015-08-25 05:01:38 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-os2
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
$(PROJECTDIR)/gmake-os2/Makefile: makefile $(SCRIPTS) $(GENIE)
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=os2 --gcc_version=$(GCC_VERSION) gmake
|
|
|
|
|
|
|
|
.PHONY: os2
|
|
|
|
os2: os2_x86
|
|
|
|
|
|
|
|
.PHONY: os2_x86
|
|
|
|
os2_x86: generate $(PROJECTDIR)/gmake-os2/Makefile
|
2016-01-01 07:56:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-os2 config=$(CONFIG)32 precompile
|
2015-08-25 05:01:38 +02:00
|
|
|
$(SILENT) $(MAKE) -C $(PROJECTDIR)/gmake-os2 config=$(CONFIG)32
|
|
|
|
|
|
|
|
|
2016-01-25 20:01:40 +01:00
|
|
|
#-------------------------------------------------
|
|
|
|
# gmake-steamlink
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
$(PROJECTDIR)/gmake-steamlink/Makefile: makefile $(SCRIPTS) $(GENIE)
|
|
|
|
ifndef MARVELL_SDK_PATH
|
|
|
|
$(error MARVELL_SDK_PATH is not set)
|
|
|
|
endif
|
|
|
|
ifndef MARVELL_ROOTFS
|
|
|
|
$(error MARVELL_ROOTFS is not set)
|
|
|
|
endif
|
2016-02-15 12:05:31 +01:00
|
|
|
$(SILENT) $(GENIE) $(PARAMS) --gcc=steamlink --gcc_version=$(GCC_VERSION) --USE_BGFX=0 --NO_OPENGL=1 --NO_USE_MIDI=1 --NO_X11=1 --NOASM=1 --SDL_INSTALL_ROOT=$(MARVELL_ROOTFS)/usr gmake
|
2016-01-25 20:01:40 +01:00
|
|
|
|
|
|
|
.PHONY: steamlink
|
|
|
|
ifndef MARVELL_SDK_PATH
|
|
|
|
$(error MARVELL_SDK_PATH is not set)
|
|
|
|
endif
|
|
|
|
ifndef MARVELL_ROOTFS
|
|
|
|
$(error MARVELL_ROOTFS is not set)
|
|
|
|
endif
|
|
|
|
steamlink: generate $(PROJECTDIR)/gmake-steamlink/Makefile
|
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) precompile
|
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG)
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-11-08 15:00:26 +01:00
|
|
|
#-------------------------------------------------
|
|
|
|
# cmake
|
|
|
|
#-------------------------------------------------
|
|
|
|
cmake: generate
|
|
|
|
$(SILENT) $(GENIE) $(PARAMS) cmake
|
2015-11-08 17:26:46 +01:00
|
|
|
ifeq ($(OS),windows)
|
2015-12-07 11:30:31 +01:00
|
|
|
$(SILENT)echo cmake_minimum_required(VERSION 2.8.4) > CMakeLists.txt
|
|
|
|
$(SILENT)echo add_subdirectory($(PROJECTDIR)/cmake) >> CMakeLists.txt
|
2015-11-08 17:26:46 +01:00
|
|
|
else
|
2015-12-07 11:30:31 +01:00
|
|
|
$(SILENT)echo "cmake_minimum_required(VERSION 2.8.4)" > CMakeLists.txt
|
|
|
|
$(SILENT)echo "add_subdirectory($(PROJECTDIR)/cmake)" >> CMakeLists.txt
|
2015-11-08 17:26:46 +01:00
|
|
|
endif
|
2015-11-08 15:00:26 +01:00
|
|
|
|
2015-12-07 11:30:31 +01:00
|
|
|
|
2015-03-30 05:19:54 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# Clean/bootstrap
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2015-04-05 08:23:57 +02:00
|
|
|
GENIE_SRC=$(wildcard 3rdparty/genie/src/host/*.c)
|
|
|
|
|
|
|
|
$(GENIE): $(GENIE_SRC)
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-04-05 08:23:57 +02:00
|
|
|
3rdparty/genie/src/hosts/%.c:
|
|
|
|
|
2015-03-26 09:00:39 +01:00
|
|
|
clean:
|
|
|
|
@echo Cleaning...
|
2015-11-02 12:37:01 +01:00
|
|
|
-@rm -rf $(BUILDDIR)
|
2015-04-02 15:45:49 +02:00
|
|
|
$(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean
|
2016-01-27 15:34:31 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(SRC)/devices/cpu/m68000 clean
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-04-08 14:02:13 +02:00
|
|
|
GEN_FOLDERS := $(GENDIR)/$(TARGET)/layout/ $(GENDIR)/$(TARGET)/$(SUBTARGET)/
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-04-04 14:44:06 +02:00
|
|
|
LAYOUTS=$(wildcard $(SRC)/$(TARGET)/layout/*.lay)
|
2007-12-17 16:19:59 +01:00
|
|
|
|
2015-03-28 14:27:39 +01:00
|
|
|
ifneq (,$(wildcard src/osd/$(OSD)/$(OSD).mak))
|
|
|
|
include src/osd/$(OSD)/$(OSD).mak
|
|
|
|
endif
|
|
|
|
|
2015-05-09 16:13:15 +02:00
|
|
|
ifneq (,$(wildcard src/$(TARGET)/$(TARGET).mak))
|
|
|
|
include src/$(TARGET)/$(TARGET).mak
|
2015-03-30 09:29:59 +02:00
|
|
|
endif
|
|
|
|
|
2015-03-28 14:27:39 +01:00
|
|
|
$(GEN_FOLDERS):
|
|
|
|
-$(call MKDIR,$@)
|
|
|
|
|
2015-03-26 12:41:36 +01:00
|
|
|
generate: \
|
|
|
|
$(GENIE) \
|
|
|
|
$(GEN_FOLDERS) \
|
2016-01-27 15:34:31 +01:00
|
|
|
$(patsubst $(SRC)/%.lay,$(GENDIR)/%.lh,$(LAYOUTS)) \
|
|
|
|
$(SRC)/devices/cpu/m68000/m68kops.cpp
|
2015-03-26 14:28:13 +01:00
|
|
|
|
2016-01-03 16:54:13 +01:00
|
|
|
$(GENDIR)/%.lh: $(SRC)/%.lay scripts/build/file2str.py | $(GEN_FOLDERS)
|
2015-03-26 09:00:39 +01:00
|
|
|
@echo Converting $<...
|
2015-10-07 12:01:21 +02:00
|
|
|
$(SILENT)$(PYTHON) scripts/build/file2str.py $< $@ layout_$(basename $(notdir $<))
|
2015-04-23 14:07:14 +02:00
|
|
|
|
2016-01-27 15:34:31 +01:00
|
|
|
$(SRC)/devices/cpu/m68000/m68kops.cpp: $(SRC)/devices/cpu/m68000/m68k_in.cpp $(SRC)/devices/cpu/m68000/m68kmake.cpp
|
2016-01-31 21:43:55 +01:00
|
|
|
ifeq ($(TARGETOS),asmjs)
|
|
|
|
$(SILENT) $(MAKE) -C $(SRC)/devices/cpu/m68000
|
|
|
|
else
|
2016-02-08 10:52:20 +01:00
|
|
|
$(SILENT) $(MAKE) -C $(SRC)/devices/cpu/m68000 CC="$(CC)" CXX="$(CXX)"
|
2016-01-31 21:43:55 +01:00
|
|
|
endif
|
2015-12-07 11:30:31 +01:00
|
|
|
|
2015-04-23 14:07:14 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
# Regression tests
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2015-11-05 13:40:39 +01:00
|
|
|
include regtests/regtests.mak
|
2015-04-23 14:07:14 +02:00
|
|
|
|
2015-04-25 14:14:12 +02:00
|
|
|
.PHONY: tests
|
|
|
|
|
2015-04-23 14:07:14 +02:00
|
|
|
tests: $(REGTESTS)
|
2015-04-25 14:14:12 +02:00
|
|
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
# Source cleanup
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
.PHONY: cleansrc
|
|
|
|
|
|
|
|
cleansrc:
|
|
|
|
@echo Cleaning up tabs/spaces/end of lines....
|
|
|
|
ifeq ($(OS),windows)
|
|
|
|
$(shell for /r src %%i in (*.c) do srcclean %%i >&2 )
|
|
|
|
$(shell for /r src %%i in (*.h) do srcclean %%i >&2 )
|
|
|
|
$(shell for /r src %%i in (*.mak) do srcclean %%i >&2 )
|
|
|
|
$(shell for /r src %%i in (*.lst) do srcclean %%i >&2 )
|
|
|
|
$(shell for /r src %%i in (*.lay) do srcclean %%i >&2 )
|
|
|
|
$(shell for /r src %%i in (*.inc) do srcclean %%i >&2 )
|
|
|
|
$(shell for /r hash %%i in (*.xml) do srcclean %%i >&2 )
|
|
|
|
else
|
|
|
|
$(shell find src/ -name *.c -exec ./srcclean {} >&2 ;)
|
|
|
|
$(shell find src/ -name *.h -exec ./srcclean {} >&2 ;)
|
|
|
|
$(shell find src/ -name *.mak -exec ./srcclean {} >&2 ;)
|
|
|
|
$(shell find src/ -name *.lst -exec ./srcclean {} >&2 ;)
|
|
|
|
$(shell find src/ -name *.lay -exec ./srcclean {} >&2 ;)
|
|
|
|
$(shell find src/ -name *.inc -exec ./srcclean {} >&2 ;)
|
|
|
|
$(shell find hash/ -name *.xml -exec ./srcclean {} >&2 ;)
|
|
|
|
endif
|
2015-05-12 10:28:41 +02:00
|
|
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
# Doxygen documentation
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
.PHONY: doxygen
|
|
|
|
|
|
|
|
doxygen:
|
|
|
|
@echo Generate Doxygen documentation
|
2015-11-16 10:30:51 +01:00
|
|
|
doxygen doxygen/doxygen.config
|
2015-05-12 12:46:02 +02:00
|
|
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
# CppCheck analysis
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
.PHONY: cppcheck
|
|
|
|
|
|
|
|
CPPCHECK_PARAMS = -Isrc/osd
|
|
|
|
CPPCHECK_PARAMS += -Isrc/emu
|
|
|
|
CPPCHECK_PARAMS += -Isrc/lib
|
|
|
|
CPPCHECK_PARAMS += -Isrc/lib/util
|
|
|
|
CPPCHECK_PARAMS += -Isrc/mame
|
|
|
|
CPPCHECK_PARAMS += -Isrc/osd/modules/render
|
|
|
|
CPPCHECK_PARAMS += -Isrc/osd/windows
|
|
|
|
CPPCHECK_PARAMS += -Isrc/emu/cpu/m68000
|
|
|
|
CPPCHECK_PARAMS += -I3rdparty
|
2015-06-06 23:39:24 +02:00
|
|
|
ifndef USE_SYSTEM_LIB_LUA
|
2015-05-12 12:46:02 +02:00
|
|
|
CPPCHECK_PARAMS += -I3rdparty/lua/src
|
2015-06-06 23:39:24 +02:00
|
|
|
endif
|
|
|
|
ifndef USE_SYSTEM_LIB_ZLIB
|
2015-11-02 12:37:01 +01:00
|
|
|
CPPCHECK_PARAMS += -I3rdparty/zlib
|
2015-06-06 23:39:24 +02:00
|
|
|
endif
|
2015-05-12 12:46:02 +02:00
|
|
|
CPPCHECK_PARAMS += -I3rdparty/bgfx/include
|
|
|
|
CPPCHECK_PARAMS += -I3rdparty/bx/include
|
2015-11-02 12:37:01 +01:00
|
|
|
CPPCHECK_PARAMS += -I$(BUILDDIR)/generated/emu
|
|
|
|
CPPCHECK_PARAMS += -I$(BUILDDIR)/generated/emu/layout
|
|
|
|
CPPCHECK_PARAMS += -I$(BUILDDIR)/generated/mame/layout
|
2015-05-12 12:46:02 +02:00
|
|
|
CPPCHECK_PARAMS += -DX64_WINDOWS_ABI
|
|
|
|
CPPCHECK_PARAMS += -DPTR64=1
|
|
|
|
CPPCHECK_PARAMS += -DMAME_DEBUG
|
|
|
|
CPPCHECK_PARAMS += -DMAME_PROFILER
|
|
|
|
CPPCHECK_PARAMS += -DCRLF=3
|
|
|
|
CPPCHECK_PARAMS += -DLSB_FIRST
|
2015-06-06 23:39:24 +02:00
|
|
|
ifndef USE_SYSTEM_LIB_FLAC
|
2015-05-12 12:46:02 +02:00
|
|
|
CPPCHECK_PARAMS += -DFLAC__NO_DLL
|
2015-06-06 23:39:24 +02:00
|
|
|
endif
|
2015-05-12 12:46:02 +02:00
|
|
|
CPPCHECK_PARAMS += -DNATIVE_DRC=drcbe_x64
|
|
|
|
CPPCHECK_PARAMS += -DLUA_COMPAT_APIINTCASTS
|
|
|
|
CPPCHECK_PARAMS += -DWIN32
|
|
|
|
CPPCHECK_PARAMS += -D__GNUC__
|
|
|
|
CPPCHECK_PARAMS += -D__x86_64__
|
|
|
|
ifndef VERBOSE
|
|
|
|
CPPCHECK_PARAMS += --quiet
|
|
|
|
endif
|
|
|
|
|
|
|
|
cppcheck:
|
|
|
|
@echo Generate CppCheck analysis report
|
|
|
|
cppcheck --enable=all src/ $(CPPCHECK_PARAMS) -j9
|
2015-12-12 19:30:43 +01:00
|
|
|
|
2016-02-07 15:49:55 +01:00
|
|
|
.PHONY: shaders
|
|
|
|
|
|
|
|
shaders:
|
|
|
|
$(SILENT) $(MAKE) -C $(SRC)/osd/modules/render/bgfx rebuild
|