Makefile

Fri, 16 Dec 2011 23:21:28 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 16 Dec 2011 23:21:28 +0000
changeset 0
3ebc0316f54f
permissions
-rw-r--r--

Initial commit with my changes.
Originally imported from yaml-2.0.tar.gz: http://files.luaforge.net/releases/yaml/yaml/0.2/yaml-0.2.tar.gz

# Default installation prefix
PREFIX=/usr

# System's libraries directory (where binary libraries are installed)
LUA_LIBDIR=$(PREFIX)/lib/lua/5.1

# System's lua directory (where Lua libraries are installed)
LUA_DIR=$(PREFIX)/share/lua/5.1

LUAINC=$(PREFIX)/include/lua5.1
LUALIB=$(PREFIX)/lib

CC=gcc
# -fexceptions is necessary if your Lua was built with a C++ compiler and 
# uses exceptions internally; can be removed
CFLAGS=-O2 -Wall $(INC) -shared -fPIC -fexceptions
LDFLAGS=-shared -L$(LUALIB) -lyaml
INC=-I$(LUAINC)

OBJS=lyaml.o b64.o

all:    yaml.so

install:
	cp -f yaml.so $(LUA_LIBDIR)

uninstall:
	rm -f $(LUA_LIBDIR)/yaml.so 
        
yaml.so: $(OBJS)
	$(CC) -o $@ $(LDFLAGS) $(OBJS)

clean:
	rm -f $(OBJS) yaml.so core core.* a.out

mercurial