diff options
| author | Diego Nehab <diego.nehab@gmail.com> | 2016-02-11 11:02:58 -0200 |
|---|---|---|
| committer | Diego Nehab <diego.nehab@gmail.com> | 2016-02-11 11:02:58 -0200 |
| commit | bf13ec7fd4fb05666964cf629e9b10591356ff67 (patch) | |
| tree | 16ba969d0ea20dd10478873bff8a00d3e90cf681 /src/makefile | |
| parent | 280e1d68a62ebf65b4526e300813e6d805216ea7 (diff) | |
| parent | 5d52ffedf49ca14af2926eac9ddbf9bfc5e8c56c (diff) | |
| download | luasocket-bf13ec7fd4fb05666964cf629e9b10591356ff67.tar.gz luasocket-bf13ec7fd4fb05666964cf629e9b10591356ff67.tar.bz2 luasocket-bf13ec7fd4fb05666964cf629e9b10591356ff67.zip | |
Merge pull request #155 from JonasKunze/feature/solaris
Added Solaris platform
Diffstat (limited to 'src/makefile')
| -rw-r--r-- | src/makefile | 30 |
1 files changed, 28 insertions, 2 deletions
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" |
