From 6d5e40c324c84d9c1453ae88e0ad5bdd0a631448 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Mon, 9 Sep 2013 14:55:20 -0300 Subject: Add MYCFLAGS and MYLDFLAGS go allow for customization --- src/makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/makefile b/src/makefile index 3ab133b..8d3521e 100644 --- a/src/makefile +++ b/src/makefile @@ -20,6 +20,12 @@ PLAT?=linux # lua version to build against LUAV?=5.1 +# MYCFLAGS: to be set by user if needed +MYCFLAGS= + +# MYLDFLAGS: to be set by user if needed +MYLDFLAGS= + # DEBUG: NODEBUG DEBUG # debug mode causes luasocket to collect and returns timing information useful # for testing and debugging luasocket itself @@ -40,7 +46,6 @@ LUAPREFIX_macosx?=/opt/local CDIR_macosx?=lib/lua/$(LUAV) LDIR_macosx?=share/lua/$(LUAV) - # LUAINC_linux: # /usr/include/lua$(LUAV) # /usr/local/include @@ -62,7 +67,7 @@ CDIR_freebsd?=lib/lua/$(LUAV) LDIR_freebsd?=share/lua/$(LUAV) # where lua headers are found for mingw builds -# LUAINC_mingw: +# LUAINC_mingw: # /opt/local/include LUAINC_mingw_base?=/usr/include LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV) @@ -220,7 +225,7 @@ SOCKET_win32=wsocket.obj .SUFFIXES: .obj .c.obj: - $(CC) $(CFLAGS) //Fo"$@" //c $< + $(CC) $(LUASOCKET_CFLAGS) //Fo"$@" //c $< #------ # Output file names @@ -240,8 +245,8 @@ SOCKET=$(SOCKET_$(PLAT)) # CC=$(CC_$(PLAT)) DEF=$(DEF_$(PLAT)) -CFLAGS=$(CFLAGS_$(PLAT)) -LDFLAGS=$(LDFLAGS_$(PLAT)) +CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT)) +LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT)) LD=$(LD_$(PLAT)) LUAINC= $(LUAINC_$(PLAT)) LUALIB= $(LUALIB_$(PLAT)) @@ -284,7 +289,7 @@ UNIX_OBJS=\ #------ # Modules belonging to serial (device streams) # -SERIAL_OBJS:=\ +SERIAL_OBJS=\ buffer.$(O) \ auxiliar.$(O) \ options.$(O) \ -- cgit v1.2.3-55-g6feb