| 1 |
# -*- Mode: Makefile -*- |
| 2 |
# |
| 3 |
# Makefile.am - automake file for LUA interface to Redland |
| 4 |
# |
| 5 |
# Copyright (C) 2010 David Beckett - http://www.dajobe.org/ |
| 6 |
# |
| 7 |
# This package is Free Software and part of Redland http://librdf.org/ |
| 8 |
# |
| 9 |
# It is licensed under the following three licenses as alternatives: |
| 10 |
# 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version |
| 11 |
# 2. GNU General Public License (GPL) V2 or any newer version |
| 12 |
# 3. Apache License, V2.0 or any newer version |
| 13 |
# |
| 14 |
# You may not use this file except in compliance with at least one of |
| 15 |
# the above three licenses. |
| 16 |
# |
| 17 |
# See LICENSE.html or LICENSE.txt at the top of this package for the |
| 18 |
# full license terms. |
| 19 |
# |
| 20 |
|
| 21 |
AM_CPPFLAGS=@CPPFLAGS@ @LIBRDF_CPPFLAGS@ -DREDLAND_BINDINGS_VERSION=\"@VERSION@\" |
| 22 |
AM_CFLAGS=@STANDARD_CFLAGS@ @LIBRDF_CPPFLAGS@ |
| 23 |
|
| 24 |
AM_LDFLAGS=@LIBRDF_LDFLAGS@ |
| 25 |
|
| 26 |
LUA=lua |
| 27 |
|
| 28 |
LUA_PACKAGE=redland |
| 29 |
|
| 30 |
LUA_CFLAGS=@LUA_CFLAGS@ |
| 31 |
LUA_LDFLAGS=@LUA_LDFLAGS@ |
| 32 |
LUA_SO_SUFFIX=so |
| 33 |
|
| 34 |
SWIG_OUTPUTS=$(LUA_PACKAGE)_wrap.c |
| 35 |
SWIG_CRUFT= |
| 36 |
|
| 37 |
luadir=@LUA_EXTENSION_DIR@ |
| 38 |
lua_DATA=$(LUA_PACKAGE).$(LUA_SO_SUFFIX) |
| 39 |
|
| 40 |
EXTRA_DIST= test.lua \ |
| 41 |
$(SWIG_OUTPUTS) |
| 42 |
|
| 43 |
CLEANFILES=*.db test-out.rdf \ |
| 44 |
$(LUA_PACKAGE)_wrap.o $(LUA_PACKAGE)-stamp \ |
| 45 |
$(LUA_PACKAGE).$(LUA_SO_SUFFIX) $(LUA_PACKAGE).bundle |
| 46 |
MAINTAINERCLEANFILES=$(SWIG_OUTPUTS) $(SWIG_CRUFT) $(LUA_PACKAGE)_wrap.c.orig |
| 47 |
|
| 48 |
RUN=@REDLAND_RUN@ |
| 49 |
|
| 50 |
SWIG_OPTS=-I$(srcdir) |
| 51 |
|
| 52 |
$(LUA_PACKAGE)_wrap.c: @REDLAND_SWIG@ |
| 53 |
swig -lua -v $(SWIG_OPTS) -module $(LUA_PACKAGE) -o $@ @REDLAND_SWIG@ |
| 54 |
|
| 55 |
$(LUA_PACKAGE)_wrap.o: $(LUA_PACKAGE)_wrap.c |
| 56 |
$(CC) $(DEFS) $(LUA_CFLAGS) $(SWIG_OPTS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(STANDARD_CFLAGS) -fPIC -DPIC $(LUA_PACKAGE)_wrap.c -c -o $@ |
| 57 |
|
| 58 |
$(LUA_PACKAGE).$(LUA_SO_SUFFIX): $(LUA_PACKAGE)-stamp |
| 59 |
$(LUA_PACKAGE)-stamp: $(LUA_PACKAGE)_wrap.o |
| 60 |
$(CC) $(STANDARD_CFLAGS) $(LUA_PACKAGE)_wrap.o $(AM_LDFLAGS) -fPIC -shared $(LDFLAGS) $(LUA_LDFLAGS) -o $(LUA_PACKAGE).$(LUA_SO_SUFFIX) |
| 61 |
touch $(LUA_PACKAGE)-stamp |
| 62 |
|
| 63 |
test-lua: |
| 64 |
$(LUA) test.lua |
| 65 |
|
| 66 |
check-local: test-lua |