diff options
author | Jonas Kunze <kunze.jonas@gmail.com> | 2016-01-15 18:48:57 +0100 |
---|---|---|
committer | Jonas Kunze <kunze.jonas@gmail.com> | 2016-01-15 18:48:57 +0100 |
commit | 5d52ffedf49ca14af2926eac9ddbf9bfc5e8c56c (patch) | |
tree | 6bba476b9e65c5a94e1e5e81cce4030b14c854b2 | |
parent | 83880dbed77f9a0a3627bce2e7bfbe1b862e091d (diff) | |
download | luasocket-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-- | makefile | 2 | ||||
-rw-r--r-- | src/makefile | 30 |
2 files changed, 29 insertions, 3 deletions
@@ -10,7 +10,7 @@ | |||
10 | # print print the build settings | 10 | # print print the build settings |
11 | 11 | ||
12 | PLAT?= linux | 12 | PLAT?= linux |
13 | PLATS= macosx linux win32 mingw freebsd | 13 | PLATS= macosx linux win32 mingw freebsd solaris |
14 | 14 | ||
15 | all: $(PLAT) | 15 | all: $(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 |
59 | LUAINC_freebsd_base?=/usr/local/include/ | 59 | LUAINC_freebsd_base?=/usr/local/include/ |
60 | LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV) | 60 | LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV) |
61 | LUAPREFIX_freebsd?=/usr/local/ | 61 | LUAPREFIX_freebsd?=/usr/local/ |
@@ -86,6 +86,13 @@ LUALIB_win32?=$(LUAPREFIX_win32)/lib/lua/$(LUAV)/$(PLATFORM_win32) | |||
86 | LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib | 86 | LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib |
87 | 87 | ||
88 | 88 | ||
89 | # LUAINC_solaris: | ||
90 | LUAINC_solaris_base?=/usr/include | ||
91 | LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV) | ||
92 | LUAPREFIX_solaris?=/usr/local | ||
93 | CDIR_solaris?=lib/lua/$(LUAV) | ||
94 | LDIR_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 |
91 | prefix?=$(LUAPREFIX_$(PLAT)) | 98 | prefix?=$(LUAPREFIX_$(PLAT)) |
@@ -132,7 +139,7 @@ print: | |||
132 | #------ | 139 | #------ |
133 | # Supported platforms | 140 | # Supported platforms |
134 | # | 141 | # |
135 | PLATS= macosx linux win32 mingw | 142 | PLATS= 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 | ||
195 | SO_solaris=so | ||
196 | O_solaris=o | ||
197 | CC_solaris=gcc | ||
198 | DEF_solaris=-DLUASOCKET_$(DEBUG) \ | ||
199 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ | ||
200 | -DUNIX_API='__attribute__((visibility("default")))' \ | ||
201 | -DMIME_API='__attribute__((visibility("default")))' | ||
202 | CFLAGS_solaris=-I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ | ||
203 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | ||
204 | LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o | ||
205 | LD_solaris=gcc | ||
206 | SOCKET_solaris=usocket.o | ||
207 | |||
208 | #------ | ||
209 | # Compiler and linker settings | ||
187 | # for MingW | 210 | # for MingW |
188 | SO_mingw=dll | 211 | SO_mingw=dll |
189 | O_mingw=o | 212 | O_mingw=o |
@@ -332,6 +355,9 @@ linux: | |||
332 | 355 | ||
333 | mingw: | 356 | mingw: |
334 | $(MAKE) all PLAT=mingw | 357 | $(MAKE) all PLAT=mingw |
358 | |||
359 | solaris: | ||
360 | $(MAKE) all-unix PLAT=solaris | ||
335 | 361 | ||
336 | none: | 362 | none: |
337 | @echo "Please run" | 363 | @echo "Please run" |