Makefile

changeset 0
3ebc0316f54f
equal deleted inserted replaced
-1:000000000000 0:3ebc0316f54f
1 # Default installation prefix
2 PREFIX=/usr
3
4 # System's libraries directory (where binary libraries are installed)
5 LUA_LIBDIR=$(PREFIX)/lib/lua/5.1
6
7 # System's lua directory (where Lua libraries are installed)
8 LUA_DIR=$(PREFIX)/share/lua/5.1
9
10 LUAINC=$(PREFIX)/include/lua5.1
11 LUALIB=$(PREFIX)/lib
12
13 CC=gcc
14 # -fexceptions is necessary if your Lua was built with a C++ compiler and
15 # uses exceptions internally; can be removed
16 CFLAGS=-O2 -Wall $(INC) -shared -fPIC -fexceptions
17 LDFLAGS=-shared -L$(LUALIB) -lyaml
18 INC=-I$(LUAINC)
19
20 OBJS=lyaml.o b64.o
21
22 all: yaml.so
23
24 install:
25 cp -f yaml.so $(LUA_LIBDIR)
26
27 uninstall:
28 rm -f $(LUA_LIBDIR)/yaml.so
29
30 yaml.so: $(OBJS)
31 $(CC) -o $@ $(LDFLAGS) $(OBJS)
32
33 clean:
34 rm -f $(OBJS) yaml.so core core.* a.out

mercurial