mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
Added solaris platform
To compile on solaris some libs had to be linked. So far I was only able to test it on OmniOS r151006
This commit is contained in:
parent
83880dbed7
commit
5d52ffedf4
2
makefile
2
makefile
@ -10,7 +10,7 @@
|
||||
# print print the build settings
|
||||
|
||||
PLAT?= linux
|
||||
PLATS= macosx linux win32 mingw freebsd
|
||||
PLATS= macosx linux win32 mingw freebsd solaris
|
||||
|
||||
all: $(PLAT)
|
||||
|
||||
|
30
src/makefile
30
src/makefile
@ -55,7 +55,7 @@ LDIR_linux?=share/lua/$(LUAV)
|
||||
|
||||
# LUAINC_freebsd:
|
||||
# /usr/local/include/lua$(LUAV)
|
||||
# where lua headers are found for linux builds
|
||||
# where lua headers are found for freebsd builds
|
||||
LUAINC_freebsd_base?=/usr/local/include/
|
||||
LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV)
|
||||
LUAPREFIX_freebsd?=/usr/local/
|
||||
@ -86,6 +86,13 @@ LUALIB_win32?=$(LUAPREFIX_win32)/lib/lua/$(LUAV)/$(PLATFORM_win32)
|
||||
LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib
|
||||
|
||||
|
||||
# LUAINC_solaris:
|
||||
LUAINC_solaris_base?=/usr/include
|
||||
LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV)
|
||||
LUAPREFIX_solaris?=/usr/local
|
||||
CDIR_solaris?=lib/lua/$(LUAV)
|
||||
LDIR_solaris?=share/lua/$(LUAV)
|
||||
|
||||
# prefix: /usr/local /usr /opt/local /sw
|
||||
# the top of the default install tree
|
||||
prefix?=$(LUAPREFIX_$(PLAT))
|
||||
@ -132,7 +139,7 @@ print:
|
||||
#------
|
||||
# Supported platforms
|
||||
#
|
||||
PLATS= macosx linux win32 mingw
|
||||
PLATS= macosx linux win32 mingw solaris
|
||||
|
||||
#------
|
||||
# Compiler and linker settings
|
||||
@ -182,6 +189,22 @@ LDFLAGS_freebsd=-O -shared -fpic -o
|
||||
LD_freebsd=gcc
|
||||
SOCKET_freebsd=usocket.o
|
||||
|
||||
#------
|
||||
# Compiler and linker settings
|
||||
# for Solaris
|
||||
SO_solaris=so
|
||||
O_solaris=o
|
||||
CC_solaris=gcc
|
||||
DEF_solaris=-DLUASOCKET_$(DEBUG) \
|
||||
-DLUASOCKET_API='__attribute__((visibility("default")))' \
|
||||
-DUNIX_API='__attribute__((visibility("default")))' \
|
||||
-DMIME_API='__attribute__((visibility("default")))'
|
||||
CFLAGS_solaris=-I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
|
||||
-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
|
||||
LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o
|
||||
LD_solaris=gcc
|
||||
SOCKET_solaris=usocket.o
|
||||
|
||||
#------
|
||||
# Compiler and linker settings
|
||||
# for MingW
|
||||
@ -333,6 +356,9 @@ linux:
|
||||
mingw:
|
||||
$(MAKE) all PLAT=mingw
|
||||
|
||||
solaris:
|
||||
$(MAKE) all-unix PLAT=solaris
|
||||
|
||||
none:
|
||||
@echo "Please run"
|
||||
@echo " make PLATFORM"
|
||||
|
Loading…
Reference in New Issue
Block a user