42 lines
829 B
Plaintext
42 lines
829 B
Plaintext
$OpenBSD: patch-Makefile,v 1.2 2006/09/24 17:18:16 pedro Exp $
|
|
--- Makefile.orig Sun Jun 29 21:44:09 2003
|
|
+++ Makefile Sun Sep 24 14:10:52 2006
|
|
@@ -4,27 +4,27 @@
|
|
LUA= /tmp/lhf/lua-5.0
|
|
LUAINC= $(LUA)/include
|
|
LUALIB= $(LUA)/lib
|
|
-LUABIN= $(LUA)/bin
|
|
+LUABIN= $(LOCALBASE)/bin/lua
|
|
|
|
# no need to change anything below here
|
|
-CFLAGS= $(INCS) $(WARN) -O2 $G
|
|
-WARN= -ansi -pedantic -Wall
|
|
-INCS= -I$(LUAINC)
|
|
+CFLAGS+= -I$(LOCALBASE)/include -fPIC -DPIC
|
|
|
|
MYNAME= alarm
|
|
-MYLIB= l$(MYNAME)
|
|
+MYLIB= alarm
|
|
|
|
-OBJS= $(MYLIB).o
|
|
+OBJS= lalarm.o
|
|
|
|
T= $(MYLIB).so
|
|
|
|
-all: test
|
|
+all: $T
|
|
|
|
-test: $T
|
|
- $(LUABIN)/lua -l$(MYNAME) test.lua
|
|
+regress:
|
|
+ @rm -f alarm.lua
|
|
+ @echo "Running test..."; \
|
|
+ $(LUABIN) test.lua
|
|
|
|
$T: $(OBJS)
|
|
- $(CC) -o $@ -shared $(OBJS)
|
|
+ $(CC) -o $@ -shared -fPIC $(OBJS)
|
|
|
|
clean:
|
|
rm -f $(OBJS) $T core core.* a.out
|