diff options
| author | Diego Nehab <diego.nehab@gmail.com> | 2019-02-24 17:44:54 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-24 17:44:54 -0300 |
| commit | 4b0f1d753d27ad74f0aae8ae8a748f860098f2f2 (patch) | |
| tree | 053c39078dcb19a1e30f165bd4c0a01a7e5ec9fb /src | |
| parent | 40f79c1961819f4477421fac70b0e29bc2fc9cd5 (diff) | |
| parent | 5858c8e7769b2855a9492b244b8bfa9254ce1c42 (diff) | |
| download | luasocket-4b0f1d753d27ad74f0aae8ae8a748f860098f2f2.tar.gz luasocket-4b0f1d753d27ad74f0aae8ae8a748f860098f2f2.tar.bz2 luasocket-4b0f1d753d27ad74f0aae8ae8a748f860098f2f2.zip | |
Merge pull request #265 from ewestbrook/dualincpaths
src/makefile: support both lua/$(LUAV) and lua$(LUAV) include paths
Diffstat (limited to 'src')
| -rw-r--r-- | src/makefile | 24 |
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 |
| 37 | LUAINC_macosx_base?=/opt/local/include | 37 | LUAINC_macosx_base?=/opt/local/include |
| 38 | LUAINC_macosx?=$(LUAINC_macosx_base)/lua/$(LUAV) | 38 | LUAINC_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? |
| 41 | LUAPREFIX_macosx?=/opt/local | 41 | LUAPREFIX_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 |
| 50 | LUAINC_linux_base?=/usr/include | 50 | LUAINC_linux_base?=/usr/include |
| 51 | LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV) | 51 | LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV) $(LUAINC_linux_base)/lua$(LUAV) |
| 52 | LUAPREFIX_linux?=/usr/local | 52 | LUAPREFIX_linux?=/usr/local |
| 53 | CDIR_linux?=lib/lua/$(LUAV) | 53 | CDIR_linux?=lib/lua/$(LUAV) |
| 54 | LDIR_linux?=share/lua/$(LUAV) | 54 | LDIR_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 |
| 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) $(LUAINC_freebsd_base)/lua$(LUAV) |
| 61 | LUAPREFIX_freebsd?=/usr/local/ | 61 | LUAPREFIX_freebsd?=/usr/local/ |
| 62 | CDIR_freebsd?=lib/lua/$(LUAV) | 62 | CDIR_freebsd?=lib/lua/$(LUAV) |
| 63 | LDIR_freebsd?=share/lua/$(LUAV) | 63 | LDIR_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 |
| 68 | LUAINC_mingw_base?=/usr/include | 68 | LUAINC_mingw_base?=/usr/include |
| 69 | LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) | 69 | LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) $(LUAINC_mingw_base)/lua$(LUAV) |
| 70 | LUALIB_mingw_base?=/usr/bin | 70 | LUALIB_mingw_base?=/usr/bin |
| 71 | LUALIB_mingw?=$(LUALIB_mingw_base)/lua/$(LUAV)/lua$(subst .,,$(LUAV)).dll | 71 | LUALIB_mingw?=$(LUALIB_mingw_base)/lua/$(LUAV)/lua$(subst .,,$(LUAV)).dll |
| 72 | LUAPREFIX_mingw?=/usr | 72 | LUAPREFIX_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 |
| 80 | LUAPREFIX_win32?= | 80 | LUAPREFIX_win32?= |
| 81 | LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV) | 81 | LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV) $(LUAPREFIX_win32)/include/lua$(LUAV) |
| 82 | PLATFORM_win32?=Release | 82 | PLATFORM_win32?=Release |
| 83 | CDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32) | 83 | CDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32) |
| 84 | LDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)/lua | 84 | LDIR_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: |
| 90 | LUAINC_solaris_base?=/usr/include | 90 | LUAINC_solaris_base?=/usr/include |
| 91 | LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV) | 91 | LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV) $(LUAINC_solaris_base)/lua$(LUAV) |
| 92 | LUAPREFIX_solaris?=/usr/local | 92 | LUAPREFIX_solaris?=/usr/local |
| 93 | CDIR_solaris?=lib/lua/$(LUAV) | 93 | CDIR_solaris?=lib/lua/$(LUAV) |
| 94 | LDIR_solaris?=share/lua/$(LUAV) | 94 | LDIR_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")))' |
| 156 | CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \ | 156 | CFLAGS_macosx=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common \ |
| 157 | -fvisibility=hidden | 157 | -fvisibility=hidden |
| 158 | LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o | 158 | LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o |
| 159 | LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc | 159 | LD_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")))' |
| 172 | CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ | 172 | CFLAGS_linux=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ |
| 173 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | 173 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden |
| 174 | LDFLAGS_linux=-O -shared -fpic -o | 174 | LDFLAGS_linux=-O -shared -fpic -o |
| 175 | LD_linux=gcc | 175 | LD_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")))' |
| 188 | CFLAGS_freebsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ | 188 | CFLAGS_freebsd=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ |
| 189 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | 189 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden |
| 190 | LDFLAGS_freebsd=-O -shared -fpic -o | 190 | LDFLAGS_freebsd=-O -shared -fpic -o |
| 191 | LD_freebsd=gcc | 191 | LD_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")))' |
| 204 | CFLAGS_solaris=-I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \ | 204 | CFLAGS_solaris=$(LUAINC:%=-I%) $(DEF) -Wall -Wshadow -Wextra \ |
| 205 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden | 205 | -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden |
| 206 | LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o | 206 | LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o |
| 207 | LD_solaris=gcc | 207 | LD_solaris=gcc |
| @@ -216,7 +216,7 @@ CC_mingw=gcc | |||
| 216 | DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) \ | 216 | DEF_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)' |
| 219 | CFLAGS_mingw= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \ | 219 | CFLAGS_mingw=$(LUAINC:%=-I%) $(DEF) -Wall -O2 -fno-common \ |
| 220 | -fvisibility=hidden | 220 | -fvisibility=hidden |
| 221 | LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o | 221 | LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o |
| 222 | LD_mingw=gcc | 222 | LD_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)" |
| 236 | CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo | 236 | CFLAGS_win32=$(LUAINC:%=//I "%") $(DEF) //O2 //Ot //MD //W3 //nologo |
| 237 | LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \ | 237 | LDFLAGS_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'" \ |
