2020-03-07 20:27:38 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Clear the implicit built in rules
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
.SUFFIXES:
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
ifeq ($(strip $(PSL1GHT)),)
|
|
|
|
$(error "Please set PSL1GHT in your environment. export PSL1GHT=<path>")
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(PSL1GHT)/ppu_rules
|
|
|
|
|
2017-09-25 23:05:43 +00:00
|
|
|
include version.all
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
DEBUG = 0
|
2012-09-16 03:22:44 +00:00
|
|
|
HAVE_LOGGER = 0
|
2020-03-07 20:27:38 +00:00
|
|
|
HAVE_FILE_LOGGER = 1
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
|
|
|
PC_DEVELOPMENT_UDP_PORT = 3490
|
|
|
|
|
2020-03-07 20:27:38 +00:00
|
|
|
CONTENTID = UP0001-SSNE10001_00-0000000000000001
|
|
|
|
APPID = SSNE10001
|
|
|
|
TITLE = Retroarch PSL1GHT
|
|
|
|
PACKAGE_BASENAME := retroarch_psl1ght
|
2012-09-16 02:04:25 +00:00
|
|
|
|
2012-07-01 11:33:30 +00:00
|
|
|
ELF_TARGET := retroarch_psl1ght.elf
|
2020-03-07 20:27:38 +00:00
|
|
|
SELF_TARGET := $(ELF_TARGET:.elf=.self)
|
|
|
|
CORE_PATH = pkg/psl1ght/pkg/USRDIR/cores/CORE.SELF
|
2012-07-01 11:33:30 +00:00
|
|
|
|
2020-03-07 20:27:38 +00:00
|
|
|
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude
|
|
|
|
LIBDIRS += -L.
|
2012-07-01 11:33:30 +00:00
|
|
|
|
2020-03-07 20:27:38 +00:00
|
|
|
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell
|
2012-07-16 20:22:05 +00:00
|
|
|
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
2012-07-01 11:33:30 +00:00
|
|
|
LDFLAGS := $(MACHDEP)
|
2020-03-07 20:27:38 +00:00
|
|
|
LIBS := -lretro_psl1ght -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl
|
2012-09-16 02:04:25 +00:00
|
|
|
|
|
|
|
# system platform
|
|
|
|
system_platform = unix
|
|
|
|
ifeq ($(shell uname -a),)
|
|
|
|
EXE_EXT = .exe
|
|
|
|
system_platform = win
|
|
|
|
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
|
|
|
system_platform = osx
|
|
|
|
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
|
|
|
system_platform = win
|
|
|
|
endif
|
|
|
|
|
2015-09-20 13:26:10 +00:00
|
|
|
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
2012-09-16 02:04:25 +00:00
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
GIT = git
|
|
|
|
else
|
|
|
|
GIT = git.exe
|
|
|
|
endif
|
2012-07-01 11:33:30 +00:00
|
|
|
|
2013-03-18 04:46:19 +00:00
|
|
|
OBJ = griffin/griffin.o
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
ifeq ($(HAVE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_LOGGER
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_FILE_LOGGER), 1)
|
|
|
|
CFLAGS += -DHAVE_FILE_LOGGER
|
|
|
|
endif
|
|
|
|
|
2019-05-12 23:57:26 +00:00
|
|
|
SHARED_FLAGS :=
|
|
|
|
|
2020-02-02 20:27:38 +00:00
|
|
|
SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
2020-06-30 17:35:41 +00:00
|
|
|
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DRARCH_INTERNAL -DHAVE_MULTIMAN -DHAVE_RGUI
|
2012-07-16 20:22:05 +00:00
|
|
|
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
|
|
|
CXXFLAGS += $(SHARED_FLAGS)
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CFLAGS += -O0 -g
|
|
|
|
else
|
2019-02-03 23:49:35 +00:00
|
|
|
CFLAGS += -O3 -g
|
2012-09-16 03:22:44 +00:00
|
|
|
CXXFLAGS += -03 -g
|
2012-07-01 11:33:30 +00:00
|
|
|
endif
|
|
|
|
|
2020-03-07 20:27:38 +00:00
|
|
|
all: $(SELF_TARGET)
|
2012-07-01 11:33:30 +00:00
|
|
|
|
|
|
|
$(ELF_TARGET): $(OBJ)
|
2012-09-11 10:33:46 +00:00
|
|
|
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(LIBS)
|
2012-07-01 11:33:30 +00:00
|
|
|
|
2020-03-07 20:27:38 +00:00
|
|
|
create-core: $(SELF_TARGET)
|
|
|
|
cp $(SELF_TARGET) $(CORE_PATH)
|
2012-09-16 02:04:25 +00:00
|
|
|
|
2020-03-07 20:27:38 +00:00
|
|
|
pkg: create-core
|
|
|
|
$(PKG) --contentid $(CONTENTID) pkg/psl1ght/pkg/ $(PACKAGE_BASENAME).pkg
|
|
|
|
# cp $(PACKAGE_BASENAME).pkg $(PACKAGE_BASENAME).gnpdrm.pkg
|
|
|
|
# $(PACKAGE_FINALIZE) $(PACKAGE_BASENAME).gnpdrm.pkg
|
2012-09-16 02:04:25 +00:00
|
|
|
|
2012-07-01 11:33:30 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(ELF_TARGET)
|
|
|
|
rm -f $(OBJ)
|
|
|
|
|
|
|
|
.PHONY: clean
|