add psp to the list of supported platforms

This commit is contained in:
Dima Pulkinen 2024-02-26 16:34:04 +02:00
parent 4975a4234d
commit f5dcb51dd6
2 changed files with 32 additions and 2 deletions

View File

@ -10,7 +10,7 @@
# print print the build settings # print print the build settings
PLAT?= linux PLAT?= linux
PLATS= macosx linux win32 win64 mingw freebsd solaris PLATS= macosx linux win32 win64 mingw freebsd solaris psp
all: $(PLAT) all: $(PLAT)

View File

@ -105,6 +105,15 @@ LUAPREFIX_solaris?=/usr/local
CDIR_solaris?=lib/lua/$(LUAV) CDIR_solaris?=lib/lua/$(LUAV)
LDIR_solaris?=share/lua/$(LUAV) LDIR_solaris?=share/lua/$(LUAV)
# LUAINC_psp:
# /usr/local/include/lua$(LUAV)
# where lua headers are found for psp builds
LUAINC_psp_base?=/usr/local/pspdev/psp/include
LUAINC_psp?=$(LUAINC_psp_base)/lua/$(LUAV) $(LUAINC_psp_base)/lua$(LUAV)
LUAPREFIX_psp?=/usr/local/
CDIR_psp?=lib/lua/$(LUAV)
LDIR_psp?=share/lua/$(LUAV)
# prefix: /usr/local /usr /opt/local /sw # prefix: /usr/local /usr /opt/local /sw
# the top of the default install tree # the top of the default install tree
prefix?=$(LUAPREFIX_$(PLAT)) prefix?=$(LUAPREFIX_$(PLAT))
@ -153,7 +162,7 @@ print:
#------ #------
# Supported platforms # Supported platforms
# #
PLATS= macosx linux win32 win64 mingw solaris PLATS= macosx linux win32 win64 mingw freebsd solaris psp
#------ #------
# Compiler and linker settings # Compiler and linker settings
@ -262,6 +271,24 @@ LDFLAGS_win64= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \
LD_win64=cl LD_win64=cl
SOCKET_win64=wsocket.obj SOCKET_win64=wsocket.obj
#------
# Compiler and linker settings
# for PSP
ifeq ($(PLAT),psp)
PSPSDK=$(shell psp-config -p)
endif
SO_psp=a
O_psp=o
CC_psp=psp-gcc
DEF_psp=-DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN
CFLAGS_psp=$(LUAINC:%=-I%) $(PSPSDK:%=-I%)/include $(DEF) -Wall -Wshadow -Wextra \
-Wimplicit -O2 -ggdb3
LDFLAGS_psp=-O -static -o
LD_psp=psp-gcc
SOCKET_psp=usocket.o
.SUFFIXES: .obj .SUFFIXES: .obj
.c.obj: .c.obj:
@ -388,6 +415,9 @@ mingw:
solaris: solaris:
$(MAKE) all-unix PLAT=solaris $(MAKE) all-unix PLAT=solaris
psp:
$(MAKE) all-unix PLAT=psp
none: none:
@echo "Please run" @echo "Please run"
@echo " make PLATFORM" @echo " make PLATFORM"