diff options
author | Diego Nehab <diego@impa.br> | 2013-05-29 16:56:56 +0800 |
---|---|---|
committer | Diego Nehab <diego@impa.br> | 2013-05-29 16:56:56 +0800 |
commit | 79e6c4915d267e149e1f3b134901bf355d439c15 (patch) | |
tree | fded0a926a268d88710e652fa8cdf06ec77cf217 /src/makefile | |
parent | 5167ddaf499cf198b10208a2f76c27629e99ae1b (diff) | |
download | luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.tar.gz luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.tar.bz2 luasocket-79e6c4915d267e149e1f3b134901bf355d439c15.zip |
Export global only if LUA_COMPAT_MODULE defined.
Diffstat (limited to 'src/makefile')
-rw-r--r-- | src/makefile | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/makefile b/src/makefile index 94a2f9f..42589f6 100644 --- a/src/makefile +++ b/src/makefile | |||
@@ -25,6 +25,10 @@ LUAV?=5.1 | |||
25 | # for testing and debugging luasocket itself | 25 | # for testing and debugging luasocket itself |
26 | DEBUG?=NODEBUG | 26 | DEBUG?=NODEBUG |
27 | 27 | ||
28 | # COMPAT: COMPAT NOCOMPAT | ||
29 | # when compiling for 5.2, use LUA_COMPAT_MODULE | ||
30 | COMPAT?=NOCOMPAT | ||
31 | |||
28 | # where lua headers are found for macosx builds | 32 | # where lua headers are found for macosx builds |
29 | # LUAINC_macosx: | 33 | # LUAINC_macosx: |
30 | # /opt/local/include | 34 | # /opt/local/include |
@@ -125,7 +129,7 @@ PLATS= macosx linux win32 mingw | |||
125 | SO_macosx=so | 129 | SO_macosx=so |
126 | O_macosx=o | 130 | O_macosx=o |
127 | CC_macosx=gcc | 131 | CC_macosx=gcc |
128 | DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_COMPAT_MODULE \ | 132 | DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_$(COMPAT)_MODULE \ |
129 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ | 133 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ |
130 | -DMIME_API='__attribute__((visibility("default")))' | 134 | -DMIME_API='__attribute__((visibility("default")))' |
131 | CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ | 135 | CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ |
@@ -140,7 +144,7 @@ SOCKET_macosx=usocket.o | |||
140 | SO_linux=so | 144 | SO_linux=so |
141 | O_linux=o | 145 | O_linux=o |
142 | CC_linux=gcc | 146 | CC_linux=gcc |
143 | DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_COMPAT_MODULE \ | 147 | DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \ |
144 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ | 148 | -DLUASOCKET_API='__attribute__((visibility("default")))' \ |
145 | -DMIME_API='__attribute__((visibility("default")))' | 149 | -DMIME_API='__attribute__((visibility("default")))' |
146 | CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \ | 150 | CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \ |
@@ -155,7 +159,7 @@ SOCKET_linux=usocket.o | |||
155 | SO_mingw=dll | 159 | SO_mingw=dll |
156 | O_mingw=o | 160 | O_mingw=o |
157 | CC_mingw=gcc | 161 | CC_mingw=gcc |
158 | DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) -DLUA_COMPAT_MODULE \ | 162 | DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \ |
159 | -DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \ | 163 | -DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \ |
160 | -DMIME_API='__declspec(dllexport)' | 164 | -DMIME_API='__declspec(dllexport)' |
161 | CFLAGS_mingw= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ | 165 | CFLAGS_mingw= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ |
@@ -173,7 +177,7 @@ O_win32=obj | |||
173 | CC_win32=cl | 177 | CC_win32=cl |
174 | DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \ | 178 | DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \ |
175 | //D "LUASOCKET_API=__declspec(dllexport)" //D "_CRT_SECURE_NO_WARNINGS" \ | 179 | //D "LUASOCKET_API=__declspec(dllexport)" //D "_CRT_SECURE_NO_WARNINGS" \ |
176 | //D "_WINDLL" //D "LUA_COMPAT_MODULE" \ | 180 | //D "_WINDLL" //D "LUA_$(COMPAT)_MODULE" \ |
177 | //D "MIME_API=__declspec(dllexport)" \ | 181 | //D "MIME_API=__declspec(dllexport)" \ |
178 | //D "LUASOCKET_$(DEBUG)" | 182 | //D "LUASOCKET_$(DEBUG)" |
179 | CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo | 183 | CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo |