$OpenBSD: patch-makefile,v 1.6 2011/08/25 19:14:58 naddy Exp $
--- makefile.orig	Wed Feb 16 16:03:25 2011
+++ makefile	Thu Aug 25 21:09:29 2011
@@ -1,14 +1,13 @@
 LIBNAME = lpeg
-LUADIR = /usr/include/lua5.1/
+LUADIR = ${LOCALBASE}/include/
 
-COPT = -O2 -DNDEBUG
+COPT = -O2 -DNDEBUG -fPIC -shared
 
-CWARNS = -Wall -Wextra -pedantic \
+CWARNS = -Wall -pedantic \
         -Waggregate-return \
 	-Wbad-function-cast \
         -Wcast-align \
         -Wcast-qual \
-	-Wdeclaration-after-statement \
 	-Wdisabled-optimization \
         -Wmissing-prototypes \
         -Wnested-externs \
@@ -21,8 +20,7 @@ CWARNS = -Wall -Wextra -pedantic \
 	#  -Wunreachable-code \
 
 
-CFLAGS = $(CWARNS) $(COPT) -ansi -I$(LUADIR)
-CC = gcc
+CFLAGS += $(CWARNS) $(COPT) -ansi -I$(LUADIR)
 
 # For Linux
 DLLFLAGS = -shared -fpic
