luasocket/config
Sam Roberts a8b19e5367 OS X CFLAGS definition caused silent failure to build debug version of luasocket.
The luasocket tests require LUASOCKET_DEBUG to be defined at build time,
but for OS X if COMPAT was undefined, the command line looked like
  ... -I -DLUASOCKET_DEBUG ...
so that the the macro definition was silently being treated as the
argument to -I. Result is the macro was never set, and tests would
never run. Fixed by moving -I to the (optional) definition of the
location of compat headers.
2012-04-11 13:45:59 -07:00

66 lines
1.2 KiB
Plaintext

#------
# LuaSocket makefile configuration
#
#------
# Output file names
#
EXT=so
SOCKET_V=2.0.2
MIME_V=1.0.2
SOCKET_SO=socket.$(EXT).$(SOCKET_V)
MIME_SO=mime.$(EXT).$(MIME_V)
UNIX_SO=unix.$(EXT)
#------
# Lua includes and libraries
#
#LUAINC=-I/usr/local/include/lua50
#LUAINC=-I/usr/local/include/lua5.1
LUAINC=-I/usr/include/lua5.1
#LUAINC=-Ilua-5.1.1/src
#------
# Compat-5.1 directory
#
#COMPAT=-Icompat-5.1r5
#------
# Top of your Lua installation
# Relative paths will be inside the src tree
DESTDIR=
prefix=/usr/local
top=$(DESTDIR)$(prefix)
#INSTALL_TOP_SHARE=/usr/local/share/lua/5.0
#INSTALL_TOP_LIB=/usr/local/lib/lua/5.0
INSTALL_TOP_SHARE=$(top)/share/lua/5.1
INSTALL_TOP_LIB=$(top)/lib/lua/5.1
INSTALL_DATA=cp
INSTALL_EXEC=cp
#------
# Compiler and linker settings
# for Mac OS X
#
#CC=gcc
#DEF= -DLUASOCKET_DEBUG -DUNIX_HAS_SUN_LEN
#CFLAGS= $(LUAINC) $(COMPAT) $(DEF) -pedantic -Wall -O2 -fno-common
#LDFLAGS=-bundle -undefined dynamic_lookup
#LD=export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
#------
# Compiler and linker settings
# for Linux
CC=gcc
DEF=-DLUASOCKET_DEBUG
CFLAGS= $(LUAINC) $(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic
LDFLAGS=-O -shared -fpic
LD=gcc
#------
# End of makefile configuration
#