aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Kunze <kunze.jonas@gmail.com>2016-01-15 18:48:57 +0100
committerJonas Kunze <kunze.jonas@gmail.com>2016-01-15 18:48:57 +0100
commit5d52ffedf49ca14af2926eac9ddbf9bfc5e8c56c (patch)
tree6bba476b9e65c5a94e1e5e81cce4030b14c854b2
parent83880dbed77f9a0a3627bce2e7bfbe1b862e091d (diff)
downloadluasocket-5d52ffedf49ca14af2926eac9ddbf9bfc5e8c56c.tar.gz
luasocket-5d52ffedf49ca14af2926eac9ddbf9bfc5e8c56c.tar.bz2
luasocket-5d52ffedf49ca14af2926eac9ddbf9bfc5e8c56c.zip
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
-rw-r--r--makefile2
-rw-r--r--src/makefile30
2 files changed, 29 insertions, 3 deletions
diff --git a/makefile b/makefile
index e34f5a9..cc15b4e 100644
--- a/makefile
+++ b/makefile
@@ -10,7 +10,7 @@
10# print print the build settings 10# print print the build settings
11 11
12PLAT?= linux 12PLAT?= linux
13PLATS= macosx linux win32 mingw freebsd 13PLATS= macosx linux win32 mingw freebsd solaris
14 14
15all: $(PLAT) 15all: $(PLAT)
16 16
diff --git a/src/makefile b/src/makefile
index 3e8c128..adf687f 100644
--- a/src/makefile
+++ b/src/makefile
@@ -55,7 +55,7 @@ LDIR_linux?=share/lua/$(LUAV)
55 55
56# LUAINC_freebsd: 56# LUAINC_freebsd:
57# /usr/local/include/lua$(LUAV) 57# /usr/local/include/lua$(LUAV)
58# where lua headers are found for linux builds 58# where lua headers are found for freebsd builds
59LUAINC_freebsd_base?=/usr/local/include/ 59LUAINC_freebsd_base?=/usr/local/include/
60LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV) 60LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV)
61LUAPREFIX_freebsd?=/usr/local/ 61LUAPREFIX_freebsd?=/usr/local/
@@ -86,6 +86,13 @@ LUALIB_win32?=$(LUAPREFIX_win32)/lib/lua/$(LUAV)/$(PLATFORM_win32)
86LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib 86LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib
87 87
88 88
89# LUAINC_solaris:
90LUAINC_solaris_base?=/usr/include
91LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV)
92LUAPREFIX_solaris?=/usr/local
93CDIR_solaris?=lib/lua/$(LUAV)
94LDIR_solaris?=share/lua/$(LUAV)
95
89# prefix: /usr/local /usr /opt/local /sw 96# prefix: /usr/local /usr /opt/local /sw
90# the top of the default install tree 97# the top of the default install tree
91prefix?=$(LUAPREFIX_$(PLAT)) 98prefix?=$(LUAPREFIX_$(PLAT))
@@ -132,7 +139,7 @@ print:
132#------ 139#------
133# Supported platforms 140# Supported platforms
134# 141#
135PLATS= macosx linux win32 mingw 142PLATS= macosx linux win32 mingw solaris
136 143
137#------ 144#------
138# Compiler and linker settings 145# Compiler and linker settings
@@ -184,6 +191,22 @@ SOCKET_freebsd=usocket.o
184 191
185#------ 192#------
186# Compiler and linker settings 193# Compiler and linker settings
194# for Solaris
195SO_solaris=so
196O_solaris=o
197CC_solaris=gcc
198DEF_solaris=-DLUASOCKET_$(DEBUG) \
199 -DLUASOCKET_API='__attribute__((visibility("default")))' \
200 -DUNIX_API='__attribute__((visibility("default")))' \
201 -DMIME_API='__attribute__((visibility("default")))'
202CFLAGS_solaris=-I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
203 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
204LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o
205LD_solaris=gcc
206SOCKET_solaris=usocket.o
207
208#------
209# Compiler and linker settings
187# for MingW 210# for MingW
188SO_mingw=dll 211SO_mingw=dll
189O_mingw=o 212O_mingw=o
@@ -332,6 +355,9 @@ linux:
332 355
333mingw: 356mingw:
334 $(MAKE) all PLAT=mingw 357 $(MAKE) all PLAT=mingw
358
359solaris:
360 $(MAKE) all-unix PLAT=solaris
335 361
336none: 362none:
337 @echo "Please run" 363 @echo "Please run"