aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego Nehab <diego@impa.br>2013-09-09 14:29:14 -0300
committerDiego Nehab <diego@impa.br>2013-09-09 14:29:14 -0300
commitd0b1f5b4c1cdc729c79c6bdc6036e3c64737f0c5 (patch)
tree641c2ba4121c01e9da628e33281ac54b8e159bd6 /src
parent396e9e5ee67dd3169aef6ef734d1f5e6f0ec76a9 (diff)
downloadluasocket-d0b1f5b4c1cdc729c79c6bdc6036e3c64737f0c5.tar.gz
luasocket-d0b1f5b4c1cdc729c79c6bdc6036e3c64737f0c5.tar.bz2
luasocket-d0b1f5b4c1cdc729c79c6bdc6036e3c64737f0c5.zip
Add support for FreeBSD in makefile
Thanks to Leryan. See issue #78.
Diffstat (limited to 'src')
-rw-r--r--src/makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/makefile b/src/makefile
index c24e61b..3ab133b 100644
--- a/src/makefile
+++ b/src/makefile
@@ -52,6 +52,15 @@ LUAPREFIX_linux?=/usr/local
52CDIR_linux?=lib/lua/$(LUAV) 52CDIR_linux?=lib/lua/$(LUAV)
53LDIR_linux?=share/lua/$(LUAV) 53LDIR_linux?=share/lua/$(LUAV)
54 54
55# LUAINC_freebsd:
56# /usr/local/include/lua$(LUAV)
57# where lua headers are found for linux builds
58LUAINC_freebsd_base?=/usr/local/include/
59LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV)
60LUAPREFIX_freebsd?=/usr/local/
61CDIR_freebsd?=lib/lua/$(LUAV)
62LDIR_freebsd?=share/lua/$(LUAV)
63
55# where lua headers are found for mingw builds 64# where lua headers are found for mingw builds
56# LUAINC_mingw: 65# LUAINC_mingw:
57# /opt/local/include 66# /opt/local/include
@@ -157,6 +166,22 @@ SOCKET_linux=usocket.o
157 166
158#------ 167#------
159# Compiler and linker settings 168# Compiler and linker settings
169# for FreeBSD
170SO_freebsd=so
171O_freebsd=o
172CC_freebsd=gcc
173DEF_freebsd=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \
174 -DLUASOCKET_API='__attribute__((visibility("default")))' \
175 -DUNIX_API='__attribute__((visibility("default")))' \
176 -DMIME_API='__attribute__((visibility("default")))'
177CFLAGS_freebsd= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \
178 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
179LDFLAGS_freebsd=-O -shared -fpic -o
180LD_freebsd=gcc
181SOCKET_freebsd=usocket.o
182
183#------
184# Compiler and linker settings
160# for MingW 185# for MingW
161SO_mingw=dll 186SO_mingw=dll
162O_mingw=o 187O_mingw=o
@@ -289,6 +314,10 @@ TO_TOP_LDIR= \
289# 314#
290default: $(PLAT) 315default: $(PLAT)
291 316
317
318freebsd:
319 $(MAKE) all-unix PLAT=freebsd
320
292macosx: 321macosx:
293 $(MAKE) all-unix PLAT=macosx 322 $(MAKE) all-unix PLAT=macosx
294 323