diff options
| author | Diego Nehab <diego@impa.br> | 2013-09-09 14:29:14 -0300 |
|---|---|---|
| committer | Diego Nehab <diego@impa.br> | 2013-09-09 14:29:14 -0300 |
| commit | d0b1f5b4c1cdc729c79c6bdc6036e3c64737f0c5 (patch) | |
| tree | 641c2ba4121c01e9da628e33281ac54b8e159bd6 /src | |
| parent | 396e9e5ee67dd3169aef6ef734d1f5e6f0ec76a9 (diff) | |
| download | luasocket-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/makefile | 29 |
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 | |||
| 52 | CDIR_linux?=lib/lua/$(LUAV) | 52 | CDIR_linux?=lib/lua/$(LUAV) |
| 53 | LDIR_linux?=share/lua/$(LUAV) | 53 | LDIR_linux?=share/lua/$(LUAV) |
| 54 | 54 | ||
| 55 | # LUAINC_freebsd: | ||
| 56 | # /usr/local/include/lua$(LUAV) | ||
| 57 | # where lua headers are found for linux builds | ||
| 58 | LUAINC_freebsd_base?=/usr/local/include/ | ||
| 59 | LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV) | ||
| 60 | LUAPREFIX_freebsd?=/usr/local/ | ||
| 61 | CDIR_freebsd?=lib/lua/$(LUAV) | ||
| 62 | LDIR_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 | ||
| 170 | SO_freebsd=so | ||
| 171 | O_freebsd=o | ||
| 172 | CC_freebsd=gcc | ||
| 173 | DEF_freebsd=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \ | ||
| 174 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ | ||
| 175 | -DUNIX_API='__attribute__((visibility("default")))' \ | ||
| 176 | -DMIME_API='__attribute__((visibility("default")))' | ||
| 177 | CFLAGS_freebsd= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \ | ||
| 178 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | ||
| 179 | LDFLAGS_freebsd=-O -shared -fpic -o | ||
| 180 | LD_freebsd=gcc | ||
| 181 | SOCKET_freebsd=usocket.o | ||
| 182 | |||
| 183 | #------ | ||
| 184 | # Compiler and linker settings | ||
| 160 | # for MingW | 185 | # for MingW |
| 161 | SO_mingw=dll | 186 | SO_mingw=dll |
| 162 | O_mingw=o | 187 | O_mingw=o |
| @@ -289,6 +314,10 @@ TO_TOP_LDIR= \ | |||
| 289 | # | 314 | # |
| 290 | default: $(PLAT) | 315 | default: $(PLAT) |
| 291 | 316 | ||
| 317 | |||
| 318 | freebsd: | ||
| 319 | $(MAKE) all-unix PLAT=freebsd | ||
| 320 | |||
| 292 | macosx: | 321 | macosx: |
| 293 | $(MAKE) all-unix PLAT=macosx | 322 | $(MAKE) all-unix PLAT=macosx |
| 294 | 323 | ||
