Add MYCFLAGS and MYLDFLAGS go allow for customization

This commit is contained in:
Diego Nehab 2013-09-09 14:55:20 -03:00
parent d0b1f5b4c1
commit 6d5e40c324

View File

@ -20,6 +20,12 @@ PLAT?=linux
# lua version to build against # lua version to build against
LUAV?=5.1 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: NODEBUG DEBUG
# debug mode causes luasocket to collect and returns timing information useful # debug mode causes luasocket to collect and returns timing information useful
# for testing and debugging luasocket itself # for testing and debugging luasocket itself
@ -40,7 +46,6 @@ LUAPREFIX_macosx?=/opt/local
CDIR_macosx?=lib/lua/$(LUAV) CDIR_macosx?=lib/lua/$(LUAV)
LDIR_macosx?=share/lua/$(LUAV) LDIR_macosx?=share/lua/$(LUAV)
# LUAINC_linux: # LUAINC_linux:
# /usr/include/lua$(LUAV) # /usr/include/lua$(LUAV)
# /usr/local/include # /usr/local/include
@ -220,7 +225,7 @@ SOCKET_win32=wsocket.obj
.SUFFIXES: .obj .SUFFIXES: .obj
.c.obj: .c.obj:
$(CC) $(CFLAGS) //Fo"$@" //c $< $(CC) $(LUASOCKET_CFLAGS) //Fo"$@" //c $<
#------ #------
# Output file names # Output file names
@ -240,8 +245,8 @@ SOCKET=$(SOCKET_$(PLAT))
# #
CC=$(CC_$(PLAT)) CC=$(CC_$(PLAT))
DEF=$(DEF_$(PLAT)) DEF=$(DEF_$(PLAT))
CFLAGS=$(CFLAGS_$(PLAT)) CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT))
LDFLAGS=$(LDFLAGS_$(PLAT)) LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT))
LD=$(LD_$(PLAT)) LD=$(LD_$(PLAT))
LUAINC= $(LUAINC_$(PLAT)) LUAINC= $(LUAINC_$(PLAT))
LUALIB= $(LUALIB_$(PLAT)) LUALIB= $(LUALIB_$(PLAT))
@ -284,7 +289,7 @@ UNIX_OBJS=\
#------ #------
# Modules belonging to serial (device streams) # Modules belonging to serial (device streams)
# #
SERIAL_OBJS:=\ SERIAL_OBJS=\
buffer.$(O) \ buffer.$(O) \
auxiliar.$(O) \ auxiliar.$(O) \
options.$(O) \ options.$(O) \