$NetBSD: patch-Makefile,v 1.1 2016/06/04 21:48:12 alnsn Exp $

Pass installation dirs properly, fix search paths, add Solaris support.

--- Makefile.orig	2016-03-03 19:11:46.000000000 +0000
+++ Makefile
@@ -6,7 +6,7 @@ LUACPATH ?= /usr/lib/lua/5.1
 # Comment this lines if you will link with non-internal LuaSocket's help files
 #  and edit INCDIR and LIBDIR properly.
 EXTRA = luasocket
-DEFS  = -DWITH_LUASOCKET
+DEFS  = -DWITH_LUASOCKET -DLUA_COMPAT_MODULE
 
 # Edit the lines below to inform new path, if necessary.
 # Path below points to internal LuaSocket's help files.
@@ -30,6 +30,7 @@ none:
 	@echo "  * linux"
 	@echo "  * bsd"
 	@echo "  * macosx"
+	@echo "  * solaris"
 
 install:
 	@cd src && $(MAKE) LUACPATH="$(LUACPATH)" LUAPATH="$(LUAPATH)" install
@@ -52,5 +53,11 @@ macosx:
 	@echo "------------------------------"
 	@cd src && $(MAKE) INCDIR="$(INCDIR)" LIBDIR="$(LIBDIR)" MACVER="$(MACOSX_VERSION)" DEFS="$(DEFS)" EXTRA="$(EXTRA)" $@
 
+solaris:
+	@echo "---------------------"
+	@echo "** Build for Solaris **"
+	@echo "---------------------"
+	@cd src ; $(MAKE) INCDIR="$(INCDIR)" LIBDIR="$(LIBDIR)" DEFS="$(DEFS)" EXTRA="$(EXTRA)" $@
+
 clean:
 	@cd src && $(MAKE) clean
