diff options
author | Diego Nehab <diego@impa.br> | 2013-09-09 14:55:20 -0300 |
---|---|---|
committer | Diego Nehab <diego@impa.br> | 2013-09-09 14:55:20 -0300 |
commit | 6d5e40c324c84d9c1453ae88e0ad5bdd0a631448 (patch) | |
tree | dce02dc702acdc6fdcc9504186e543bfd98820b9 /src | |
parent | d0b1f5b4c1cdc729c79c6bdc6036e3c64737f0c5 (diff) | |
download | luasocket-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/makefile | 17 |
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 |
21 | LUAV?=5.1 | 21 | LUAV?=5.1 |
22 | 22 | ||
23 | # MYCFLAGS: to be set by user if needed | ||
24 | MYCFLAGS= | ||
25 | |||
26 | # MYLDFLAGS: to be set by user if needed | ||
27 | MYLDFLAGS= | ||
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 | |||
40 | CDIR_macosx?=lib/lua/$(LUAV) | 46 | CDIR_macosx?=lib/lua/$(LUAV) |
41 | LDIR_macosx?=share/lua/$(LUAV) | 47 | LDIR_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) | |||
62 | LDIR_freebsd?=share/lua/$(LUAV) | 67 | LDIR_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 |
67 | LUAINC_mingw_base?=/usr/include | 72 | LUAINC_mingw_base?=/usr/include |
68 | LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) | 73 | LUAINC_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 | # |
241 | CC=$(CC_$(PLAT)) | 246 | CC=$(CC_$(PLAT)) |
242 | DEF=$(DEF_$(PLAT)) | 247 | DEF=$(DEF_$(PLAT)) |
243 | CFLAGS=$(CFLAGS_$(PLAT)) | 248 | CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT)) |
244 | LDFLAGS=$(LDFLAGS_$(PLAT)) | 249 | LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT)) |
245 | LD=$(LD_$(PLAT)) | 250 | LD=$(LD_$(PLAT)) |
246 | LUAINC= $(LUAINC_$(PLAT)) | 251 | LUAINC= $(LUAINC_$(PLAT)) |
247 | LUALIB= $(LUALIB_$(PLAT)) | 252 | LUALIB= $(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 | # |
287 | SERIAL_OBJS:=\ | 292 | SERIAL_OBJS=\ |
288 | buffer.$(O) \ | 293 | buffer.$(O) \ |
289 | auxiliar.$(O) \ | 294 | auxiliar.$(O) \ |
290 | options.$(O) \ | 295 | options.$(O) \ |