2013-12-19 17:10:14 +00:00
|
|
|
#LOCAL_PATH:=
|
|
|
|
|
|
|
|
#MFLAGS := -marm -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3-d16 -mfloat-abi=softfp
|
|
|
|
#ASFLAGS := -march=armv7-a -mfpu=vfp-d16 -mfloat-abi=softfp
|
2015-03-29 04:02:24 +00:00
|
|
|
#LDFLAGS := -Wl,-Map,$(notdir $@).map,--gc-sections -Wl,-O3 -Wl,--sort-common
|
2013-12-19 17:10:14 +00:00
|
|
|
|
|
|
|
RZDCY_SRC_DIR ?= $(call my-dir)
|
2019-03-03 23:26:11 +00:00
|
|
|
VERSION_SRC := $(RZDCY_SRC_DIR)/version/version.cpp
|
2013-12-19 17:10:14 +00:00
|
|
|
|
2018-09-12 11:20:20 +00:00
|
|
|
RZDCY_MODULES := cfg/ hw/arm7/ hw/aica/ hw/holly/ hw/ hw/gdrom/ hw/maple/ hw/modem/ \
|
2013-12-19 17:10:14 +00:00
|
|
|
hw/mem/ hw/pvr/ hw/sh4/ hw/sh4/interpr/ hw/sh4/modules/ plugins/ profiler/ oslib/ \
|
2018-09-17 10:59:52 +00:00
|
|
|
hw/extdev/ hw/arm/ hw/naomi/ imgread/ ./ deps/coreio/ deps/zlib/ deps/chdr/ deps/crypto/ \
|
2018-09-17 15:52:29 +00:00
|
|
|
deps/libelf/ deps/chdpsr/ arm_emitter/ rend/ reios/ deps/libpng/ deps/xbrz/ \
|
2019-02-06 18:57:13 +00:00
|
|
|
deps/picotcp/modules/ deps/picotcp/stack/ deps/xxhash/ deps/libzip/ deps/imgui/ \
|
2019-02-12 10:30:24 +00:00
|
|
|
archive/ input/
|
2013-12-19 17:10:14 +00:00
|
|
|
|
2018-11-02 09:14:25 +00:00
|
|
|
ifdef CHD5_LZMA
|
|
|
|
RZDCY_MODULES += deps/lzma/
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CHD5_FLAC
|
|
|
|
RZDCY_MODULES += deps/flac/src/libFLAC/
|
|
|
|
endif
|
2014-04-25 02:59:53 +00:00
|
|
|
|
|
|
|
ifdef WEBUI
|
|
|
|
RZDCY_MODULES += webui/
|
|
|
|
RZDCY_MODULES += deps/libwebsocket/
|
2014-04-25 03:26:36 +00:00
|
|
|
|
|
|
|
ifdef FOR_ANDROID
|
|
|
|
RZDCY_MODULES += deps/ifaddrs/
|
|
|
|
endif
|
2014-04-25 02:59:53 +00:00
|
|
|
endif
|
2013-12-19 17:10:14 +00:00
|
|
|
|
|
|
|
ifndef NO_REC
|
|
|
|
RZDCY_MODULES += hw/sh4/dyna/
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef NOT_ARM
|
|
|
|
RZDCY_MODULES += rec-ARM/
|
|
|
|
endif
|
|
|
|
|
2014-03-24 22:12:30 +00:00
|
|
|
ifdef X86_REC
|
2014-04-25 09:52:08 +00:00
|
|
|
RZDCY_MODULES += rec-x86/ emitter/
|
2014-03-24 22:12:30 +00:00
|
|
|
endif
|
|
|
|
|
2015-07-14 01:35:34 +00:00
|
|
|
ifdef X64_REC
|
|
|
|
RZDCY_MODULES += rec-x64/
|
|
|
|
endif
|
|
|
|
|
2015-07-24 00:34:50 +00:00
|
|
|
ifdef CPP_REC
|
|
|
|
RZDCY_MODULES += rec-cpp/
|
|
|
|
endif
|
|
|
|
|
2019-01-07 20:50:46 +00:00
|
|
|
ifdef ARM64_REC
|
|
|
|
RZDCY_MODULES += rec-ARM64/ deps/vixl/ deps/vixl/aarch64/
|
|
|
|
endif
|
|
|
|
|
2013-12-19 17:10:14 +00:00
|
|
|
ifndef NO_REND
|
|
|
|
RZDCY_MODULES += rend/gles/
|
2018-10-04 08:29:23 +00:00
|
|
|
ifndef USE_GLES
|
2018-10-17 14:04:39 +00:00
|
|
|
ifndef USE_DISPMANX
|
2018-10-04 08:29:23 +00:00
|
|
|
RZDCY_MODULES += rend/gl4/
|
2018-10-17 14:04:39 +00:00
|
|
|
endif
|
2018-10-04 08:29:23 +00:00
|
|
|
endif
|
2013-12-19 17:10:14 +00:00
|
|
|
else
|
|
|
|
RZDCY_MODULES += rend/norend/
|
|
|
|
endif
|
|
|
|
|
2015-12-13 22:58:24 +00:00
|
|
|
ifdef HAS_SOFTREND
|
|
|
|
RZDCY_MODULES += rend/soft/
|
|
|
|
endif
|
|
|
|
|
2015-02-16 22:48:44 +00:00
|
|
|
ifndef NO_NIXPROF
|
|
|
|
RZDCY_MODULES += linux/nixprof/
|
|
|
|
endif
|
|
|
|
|
2013-12-19 17:10:14 +00:00
|
|
|
ifdef FOR_ANDROID
|
2018-11-05 21:53:38 +00:00
|
|
|
RZDCY_MODULES += android/ deps/libandroid/ linux/
|
2013-12-19 17:10:14 +00:00
|
|
|
endif
|
|
|
|
|
2015-08-29 18:23:16 +00:00
|
|
|
ifdef USE_SDL
|
|
|
|
RZDCY_MODULES += sdl/
|
|
|
|
endif
|
|
|
|
|
2013-12-19 17:10:14 +00:00
|
|
|
ifdef FOR_LINUX
|
2018-09-17 10:59:52 +00:00
|
|
|
RZDCY_MODULES += linux-dist/ linux/
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef FOR_WINDOWS
|
|
|
|
RZDCY_MODULES += windows/
|
2013-12-19 17:10:14 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
RZDCY_FILES := $(foreach dir,$(addprefix $(RZDCY_SRC_DIR)/,$(RZDCY_MODULES)),$(wildcard $(dir)*.cpp))
|
2019-01-07 20:50:46 +00:00
|
|
|
RZDCY_FILES += $(foreach dir,$(addprefix $(RZDCY_SRC_DIR)/,$(RZDCY_MODULES)),$(wildcard $(dir)*.cc))
|
2013-12-19 17:10:14 +00:00
|
|
|
RZDCY_FILES += $(foreach dir,$(addprefix $(RZDCY_SRC_DIR)/,$(RZDCY_MODULES)),$(wildcard $(dir)*.c))
|
|
|
|
RZDCY_FILES += $(foreach dir,$(addprefix $(RZDCY_SRC_DIR)/,$(RZDCY_MODULES)),$(wildcard $(dir)*.S))
|
2019-03-03 23:26:11 +00:00
|
|
|
RZDCY_FILES += $(VERSION_SRC)
|
2018-09-17 15:52:29 +00:00
|
|
|
|
2013-12-20 15:24:38 +00:00
|
|
|
ifdef FOR_PANDORA
|
2014-05-12 17:53:18 +00:00
|
|
|
RZDCY_CFLAGS := \
|
2018-10-04 08:29:23 +00:00
|
|
|
$(CFLAGS) -c -O3 \
|
2013-12-20 15:24:38 +00:00
|
|
|
-DRELEASE -DPANDORA\
|
|
|
|
-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp \
|
|
|
|
-frename-registers -fsingle-precision-constant -ffast-math \
|
2014-05-12 17:53:18 +00:00
|
|
|
-ftree-vectorize -fomit-frame-pointer
|
2014-08-18 19:17:20 +00:00
|
|
|
RZDCY_CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon
|
|
|
|
RZDCY_CFLAGS += -DTARGET_LINUX_ARMELv7
|
2013-12-20 15:24:38 +00:00
|
|
|
else
|
2018-09-17 15:52:29 +00:00
|
|
|
ifdef FOR_ANDROID
|
2014-05-12 17:53:18 +00:00
|
|
|
RZDCY_CFLAGS := \
|
2018-10-04 08:29:23 +00:00
|
|
|
$(CFLAGS) -c -O3 \
|
2018-09-17 15:52:29 +00:00
|
|
|
-D_ANDROID -DRELEASE \
|
|
|
|
-frename-registers -fsingle-precision-constant -ffast-math \
|
|
|
|
-ftree-vectorize -fomit-frame-pointer
|
|
|
|
|
|
|
|
ifndef NOT_ARM
|
|
|
|
RZDCY_CFLAGS += -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16
|
|
|
|
RZDCY_CFLAGS += -DTARGET_LINUX_ARMELv7
|
2014-03-05 10:24:03 +00:00
|
|
|
else
|
2019-01-07 20:50:46 +00:00
|
|
|
ifdef ISARM64
|
|
|
|
RZDCY_CFLAGS += -march=armv8-a
|
|
|
|
RZDCY_CFLAGS += -DTARGET_LINUX_ARMv8
|
2018-09-17 15:52:29 +00:00
|
|
|
else
|
2019-01-07 20:50:46 +00:00
|
|
|
ifdef ISMIPS
|
|
|
|
RZDCY_CFLAGS += -DTARGET_LINUX_MIPS
|
|
|
|
else
|
|
|
|
RZDCY_CFLAGS += -DTARGET_LINUX_x86
|
|
|
|
endif
|
2018-09-17 15:52:29 +00:00
|
|
|
endif
|
2014-03-05 10:24:03 +00:00
|
|
|
endif
|
2018-09-17 15:52:29 +00:00
|
|
|
else
|
2018-10-04 08:29:23 +00:00
|
|
|
RZDCY_CFLAGS :=
|
2014-03-03 12:06:00 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-10-04 08:29:23 +00:00
|
|
|
RZDCY_CFLAGS += -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/rend/gles -I$(RZDCY_SRC_DIR)/deps \
|
2019-01-07 20:50:46 +00:00
|
|
|
-I$(RZDCY_SRC_DIR)/deps/picotcp/include -I$(RZDCY_SRC_DIR)/deps/picotcp/modules \
|
2019-02-19 16:21:50 +00:00
|
|
|
-I$(RZDCY_SRC_DIR)/deps/vixl -I$(RZDCY_SRC_DIR)/khronos
|
2018-10-04 08:29:23 +00:00
|
|
|
|
2014-03-03 12:06:00 +00:00
|
|
|
ifdef NO_REC
|
2015-07-25 06:39:35 +00:00
|
|
|
RZDCY_CFLAGS += -DTARGET_NO_REC
|
2014-04-25 03:26:36 +00:00
|
|
|
endif
|
2014-05-12 17:53:18 +00:00
|
|
|
|
2015-07-29 01:09:01 +00:00
|
|
|
ifdef USE_GLES
|
2018-03-18 18:43:39 +00:00
|
|
|
RZDCY_CFLAGS += -DGLES -fPIC
|
2014-03-24 22:12:30 +00:00
|
|
|
endif
|
2014-10-22 12:39:07 +00:00
|
|
|
|
2015-12-13 22:58:24 +00:00
|
|
|
ifdef HAS_SOFTREND
|
|
|
|
RZDCY_CFLAGS += -DTARGET_SOFTREND
|
|
|
|
endif
|
|
|
|
|
2018-11-02 09:14:25 +00:00
|
|
|
ifdef CHD5_FLAC
|
|
|
|
RZDCY_CFLAGS += -I$(RZDCY_SRC_DIR)/deps/flac/src/libFLAC/include/ -I$(RZDCY_SRC_DIR)/deps/flac/include
|
|
|
|
RZDCY_CFLAGS += -DPACKAGE_VERSION=\"1.3.2\" -DFLAC__HAS_OGG=0 -DFLAC__NO_DLL -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H
|
|
|
|
endif
|
|
|
|
|
2015-03-29 04:02:24 +00:00
|
|
|
RZDCY_CXXFLAGS := $(RZDCY_CFLAGS) -fno-exceptions -fno-rtti -std=gnu++11
|
2019-03-03 23:26:11 +00:00
|
|
|
|
|
|
|
$(VERSION_SRC):
|
|
|
|
echo "const char *version = \"`git describe --tags --always`\";" > $(VERSION_SRC)
|
|
|
|
echo "const char *git_hash = \"`git rev-parse --short HEAD`\";" >> $(VERSION_SRC)
|
|
|
|
echo "const char *build_date = \"`date '+%Y-%m-%d %H:%M:%S %Z'`\";" >> $(VERSION_SRC)
|
|
|
|
|