aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego Nehab <diego@impa.br>2013-09-09 14:55:20 -0300
committerDiego Nehab <diego@impa.br>2013-09-09 14:55:20 -0300
commit6d5e40c324c84d9c1453ae88e0ad5bdd0a631448 (patch)
treedce02dc702acdc6fdcc9504186e543bfd98820b9 /src
parentd0b1f5b4c1cdc729c79c6bdc6036e3c64737f0c5 (diff)
downloadluasocket-6d5e40c324c84d9c1453ae88e0ad5bdd0a631448.tar.gz
luasocket-6d5e40c324c84d9c1453ae88e0ad5bdd0a631448.tar.bz2
luasocket-6d5e40c324c84d9c1453ae88e0ad5bdd0a631448.zip
Add MYCFLAGS and MYLDFLAGS go allow for customization
Diffstat (limited to 'src')
-rw-r--r--src/makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/makefile b/src/makefile
index 3ab133b..8d3521e 100644
--- a/src/makefile
+++ b/src/makefile
@@ -20,6 +20,12 @@ PLAT?=linux
20# lua version to build against 20# lua version to build against
21LUAV?=5.1 21LUAV?=5.1
22 22
23# MYCFLAGS: to be set by user if needed
24MYCFLAGS=
25
26# MYLDFLAGS: to be set by user if needed
27MYLDFLAGS=
28
23# DEBUG: NODEBUG DEBUG 29# DEBUG: NODEBUG DEBUG
24# debug mode causes luasocket to collect and returns timing information useful 30# debug mode causes luasocket to collect and returns timing information useful
25# for testing and debugging luasocket itself 31# for testing and debugging luasocket itself
@@ -40,7 +46,6 @@ LUAPREFIX_macosx?=/opt/local
40CDIR_macosx?=lib/lua/$(LUAV) 46CDIR_macosx?=lib/lua/$(LUAV)
41LDIR_macosx?=share/lua/$(LUAV) 47LDIR_macosx?=share/lua/$(LUAV)
42 48
43
44# LUAINC_linux: 49# LUAINC_linux:
45# /usr/include/lua$(LUAV) 50# /usr/include/lua$(LUAV)
46# /usr/local/include 51# /usr/local/include
@@ -62,7 +67,7 @@ CDIR_freebsd?=lib/lua/$(LUAV)
62LDIR_freebsd?=share/lua/$(LUAV) 67LDIR_freebsd?=share/lua/$(LUAV)
63 68
64# where lua headers are found for mingw builds 69# where lua headers are found for mingw builds
65# LUAINC_mingw: 70# LUAINC_mingw:
66# /opt/local/include 71# /opt/local/include
67LUAINC_mingw_base?=/usr/include 72LUAINC_mingw_base?=/usr/include
68LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) 73LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV)
@@ -220,7 +225,7 @@ SOCKET_win32=wsocket.obj
220.SUFFIXES: .obj 225.SUFFIXES: .obj
221 226
222.c.obj: 227.c.obj:
223 $(CC) $(CFLAGS) //Fo"$@" //c $< 228 $(CC) $(LUASOCKET_CFLAGS) //Fo"$@" //c $<
224 229
225#------ 230#------
226# Output file names 231# Output file names
@@ -240,8 +245,8 @@ SOCKET=$(SOCKET_$(PLAT))
240# 245#
241CC=$(CC_$(PLAT)) 246CC=$(CC_$(PLAT))
242DEF=$(DEF_$(PLAT)) 247DEF=$(DEF_$(PLAT))
243CFLAGS=$(CFLAGS_$(PLAT)) 248CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT))
244LDFLAGS=$(LDFLAGS_$(PLAT)) 249LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT))
245LD=$(LD_$(PLAT)) 250LD=$(LD_$(PLAT))
246LUAINC= $(LUAINC_$(PLAT)) 251LUAINC= $(LUAINC_$(PLAT))
247LUALIB= $(LUALIB_$(PLAT)) 252LUALIB= $(LUALIB_$(PLAT))
@@ -284,7 +289,7 @@ UNIX_OBJS=\
284#------ 289#------
285# Modules belonging to serial (device streams) 290# Modules belonging to serial (device streams)
286# 291#
287SERIAL_OBJS:=\ 292SERIAL_OBJS=\
288 buffer.$(O) \ 293 buffer.$(O) \
289 auxiliar.$(O) \ 294 auxiliar.$(O) \
290 options.$(O) \ 295 options.$(O) \