Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / contrib / bsdinstaller-1.1.6 / ports / devel / lua50-posix / files / patch-Makefile
1 --- Makefile.orig       2003-11-05 16:26:49.000000000 -0800
2 +++ Makefile    2005-04-03 14:22:32.000000000 -0700
3 @@ -1,30 +1,33 @@
4  # makefile for POSIX library for Lua
5  
6  # change these to reflect your Lua installation
7 -LUA= /tmp/lhf/lua-5.0
8 +LUA= /usr/local
9  LUAINC= $(LUA)/include
10  LUALIB= $(LUA)/lib
11  LUABIN= $(LUA)/bin
12  
13  # no need to change anything below here
14  CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
15 -WARN= -pedantic -Wall
16 +WARN= -Wall
17  INCS= -I$(LUAINC)
18  
19  MYNAME= posix
20  MYLIB= l$(MYNAME)
21  
22 -OBJS= $(MYLIB).o
23 +OBJS= $(MYLIB).o compat-5.1.o
24  
25  T= $(MYLIB).so
26  
27 -all:   test
28 +all:   $T
29  
30  test:  $T
31         $(LUABIN)/lua -l$(MYNAME) test.lua
32  
33  $T:    $(OBJS)
34 -       $(CC) -o $@ -shared $(OBJS)
35 +       $(CC) -o $@ -shared $(OBJS) -L$(LUALIB) -llua50 -llualib50
36 +
37 +compat-5.1.c: $(LUALIB)/lua/compat-5.1r2/compat-5.1.c
38 +       cp $(LUALIB)/lua/compat-5.1r2/compat-5.1.? .
39  
40  $(OBJS): modemuncher.c
41