aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorE. Westbrook <github@westbrook.io>2019-02-22 16:16:03 -0700
committerE. Westbrook <github@westbrook.io>2019-02-22 16:16:03 -0700
commit5858c8e7769b2855a9492b244b8bfa9254ce1c42 (patch)
treef985084dcfd88dc0f915df0b78011ba0a5fa6e9c
parent144fa01c2f204e3b1b13c834f2644d100dba701b (diff)
downloadluasocket-5858c8e7769b2855a9492b244b8bfa9254ce1c42.tar.gz
luasocket-5858c8e7769b2855a9492b244b8bfa9254ce1c42.tar.bz2
luasocket-5858c8e7769b2855a9492b244b8bfa9254ce1c42.zip
src/makefile: support both lua/$(LUAV) and lua$(LUAV) include paths
-rw-r--r--src/makefile24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/makefile b/src/makefile
index 0f4b359..cc1ec7e 100644
--- a/src/makefile
+++ b/src/makefile
@@ -35,7 +35,7 @@ DEBUG?=NODEBUG
35# LUAINC_macosx: 35# LUAINC_macosx:
36# /opt/local/include 36# /opt/local/include
37LUAINC_macosx_base?=/opt/local/include 37LUAINC_macosx_base?=/opt/local/include
38LUAINC_macosx?=$(LUAINC_macosx_base)/lua/$(LUAV) 38LUAINC_macosx?=$(LUAINC_macosx_base)/lua/$(LUAV) $(LUAINC_macosx_base)/lua$(LUAV)
39# FIXME default should this default to fink or to macports? 39# FIXME default should this default to fink or to macports?
40# What happens when more than one Lua version is installed? 40# What happens when more than one Lua version is installed?
41LUAPREFIX_macosx?=/opt/local 41LUAPREFIX_macosx?=/opt/local
@@ -48,7 +48,7 @@ LDIR_macosx?=share/lua/$(LUAV)
48# /usr/local/include/lua$(LUAV) 48# /usr/local/include/lua$(LUAV)
49# where lua headers are found for linux builds 49# where lua headers are found for linux builds
50LUAINC_linux_base?=/usr/include 50LUAINC_linux_base?=/usr/include
51LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV) 51LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV) $(LUAINC_linux_base)/lua$(LUAV)
52LUAPREFIX_linux?=/usr/local 52LUAPREFIX_linux?=/usr/local
53CDIR_linux?=lib/lua/$(LUAV) 53CDIR_linux?=lib/lua/$(LUAV)
54LDIR_linux?=share/lua/$(LUAV) 54LDIR_linux?=share/lua/$(LUAV)
@@ -57,7 +57,7 @@ LDIR_linux?=share/lua/$(LUAV)
57# /usr/local/include/lua$(LUAV) 57# /usr/local/include/lua$(LUAV)
58# where lua headers are found for freebsd 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) $(LUAINC_freebsd_base)/lua$(LUAV)
61LUAPREFIX_freebsd?=/usr/local/ 61LUAPREFIX_freebsd?=/usr/local/
62CDIR_freebsd?=lib/lua/$(LUAV) 62CDIR_freebsd?=lib/lua/$(LUAV)
63LDIR_freebsd?=share/lua/$(LUAV) 63LDIR_freebsd?=share/lua/$(LUAV)
@@ -66,7 +66,7 @@ LDIR_freebsd?=share/lua/$(LUAV)
66# LUAINC_mingw: 66# LUAINC_mingw:
67# /opt/local/include 67# /opt/local/include
68LUAINC_mingw_base?=/usr/include 68LUAINC_mingw_base?=/usr/include
69LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) 69LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) $(LUAINC_mingw_base)/lua$(LUAV)
70LUALIB_mingw_base?=/usr/bin 70LUALIB_mingw_base?=/usr/bin
71LUALIB_mingw?=$(LUALIB_mingw_base)/lua/$(LUAV)/lua$(subst .,,$(LUAV)).dll 71LUALIB_mingw?=$(LUALIB_mingw_base)/lua/$(LUAV)/lua$(subst .,,$(LUAV)).dll
72LUAPREFIX_mingw?=/usr 72LUAPREFIX_mingw?=/usr
@@ -78,7 +78,7 @@ LDIR_mingw?=lua/$(LUAV)/lua
78# LUALIB_win32: 78# LUALIB_win32:
79# where lua headers and libraries are found for win32 builds 79# where lua headers and libraries are found for win32 builds
80LUAPREFIX_win32?= 80LUAPREFIX_win32?=
81LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV) 81LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV) $(LUAPREFIX_win32)/include/lua$(LUAV)
82PLATFORM_win32?=Release 82PLATFORM_win32?=Release
83CDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32) 83CDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)
84LDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)/lua 84LDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)/lua
@@ -88,7 +88,7 @@ LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib
88 88
89# LUAINC_solaris: 89# LUAINC_solaris:
90LUAINC_solaris_base?=/usr/include 90LUAINC_solaris_base?=/usr/include
91LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV) 91LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV) $(LUAINC_solaris_base)/lua$(LUAV)
92LUAPREFIX_solaris?=/usr/local 92LUAPREFIX_solaris?=/usr/local
93CDIR_solaris?=lib/lua/$(LUAV) 93CDIR_solaris?=lib/lua/$(LUAV)
94LDIR_solaris?=share/lua/$(LUAV) 94LDIR_solaris?=share/lua/$(LUAV)
@@ -153,7 +153,7 @@ DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN \
153 -DLUASOCKET_API='__attribute__((visibility("default")))' \ 153 -DLUASOCKET_API='__attribute__((visibility("default")))' \
154 -DUNIX_API='__attribute__((visibility("default")))' \ 154 -DUNIX_API='__attribute__((visibility("default")))' \
155 -DMIME_API='__attribute__((visibility("default")))' 155 -DMIME_API='__attribute__((visibility("default")))'
156CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \ 156CFLAGS_macosx=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common \
157 -fvisibility=hidden 157 -fvisibility=hidden
158LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o 158LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o
159LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc 159LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
@@ -169,7 +169,7 @@ DEF_linux=-DLUASOCKET_$(DEBUG) \
169 -DLUASOCKET_API='__attribute__((visibility("default")))' \ 169 -DLUASOCKET_API='__attribute__((visibility("default")))' \
170 -DUNIX_API='__attribute__((visibility("default")))' \ 170 -DUNIX_API='__attribute__((visibility("default")))' \
171 -DMIME_API='__attribute__((visibility("default")))' 171 -DMIME_API='__attribute__((visibility("default")))'
172CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ 172CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
173 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden 173 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
174LDFLAGS_linux=-O -shared -fpic -o 174LDFLAGS_linux=-O -shared -fpic -o
175LD_linux=gcc 175LD_linux=gcc
@@ -185,7 +185,7 @@ DEF_freebsd=-DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN \
185 -DLUASOCKET_API='__attribute__((visibility("default")))' \ 185 -DLUASOCKET_API='__attribute__((visibility("default")))' \
186 -DUNIX_API='__attribute__((visibility("default")))' \ 186 -DUNIX_API='__attribute__((visibility("default")))' \
187 -DMIME_API='__attribute__((visibility("default")))' 187 -DMIME_API='__attribute__((visibility("default")))'
188CFLAGS_freebsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ 188CFLAGS_freebsd=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
189 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden 189 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
190LDFLAGS_freebsd=-O -shared -fpic -o 190LDFLAGS_freebsd=-O -shared -fpic -o
191LD_freebsd=gcc 191LD_freebsd=gcc
@@ -201,7 +201,7 @@ DEF_solaris=-DLUASOCKET_$(DEBUG) \
201 -DLUASOCKET_API='__attribute__((visibility("default")))' \ 201 -DLUASOCKET_API='__attribute__((visibility("default")))' \
202 -DUNIX_API='__attribute__((visibility("default")))' \ 202 -DUNIX_API='__attribute__((visibility("default")))' \
203 -DMIME_API='__attribute__((visibility("default")))' 203 -DMIME_API='__attribute__((visibility("default")))'
204CFLAGS_solaris=-I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ 204CFLAGS_solaris=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \
205 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden 205 -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
206LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o 206LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o
207LD_solaris=gcc 207LD_solaris=gcc
@@ -216,7 +216,7 @@ CC_mingw=gcc
216DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) \ 216DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) \
217 -DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \ 217 -DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \
218 -DMIME_API='__declspec(dllexport)' 218 -DMIME_API='__declspec(dllexport)'
219CFLAGS_mingw= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \ 219CFLAGS_mingw=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common \
220 -fvisibility=hidden 220 -fvisibility=hidden
221LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o 221LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o
222LD_mingw=gcc 222LD_mingw=gcc
@@ -233,7 +233,7 @@ DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \
233 //D "LUASOCKET_API=__declspec(dllexport)" //D "_CRT_SECURE_NO_WARNINGS" \ 233 //D "LUASOCKET_API=__declspec(dllexport)" //D "_CRT_SECURE_NO_WARNINGS" \
234 //D "_WINDLL" //D "MIME_API=__declspec(dllexport)" \ 234 //D "_WINDLL" //D "MIME_API=__declspec(dllexport)" \
235 //D "LUASOCKET_$(DEBUG)" 235 //D "LUASOCKET_$(DEBUG)"
236CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo 236CFLAGS_win32=$(LUAINC:%=//I "%") $(DEF) //O2 //Ot //MD //W3 //nologo
237LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \ 237LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \
238 //MANIFEST //MANIFESTFILE:"intermediate.manifest" \ 238 //MANIFEST //MANIFESTFILE:"intermediate.manifest" \
239 //MANIFESTUAC:"level='asInvoker' uiAccess='false'" \ 239 //MANIFESTUAC:"level='asInvoker' uiAccess='false'" \