new lua implementation.
[apps/madmutt.git] / lib-lua / Makefile.am
index 92cd3d2..b28c98d 100644 (file)
@@ -1,7 +1,24 @@
+BUILT_SOURCES    = lua-token.h lua-token.c
+DISTCLEANFILES   = $(BUILT_SOURCES)
+
+.cpkg.c: ; ./luapkg2c.pl -c $< > $@
+.cpkg.h: ; ./luapkg2c.pl -h $< > $@
+
 noinst_LIBRARIES = liblua.a
 
-liblua_a_SOURCES = lib-lua.h
+liblua_a_DEPENDENCIES = madmutt.h
+liblua_a_SOURCES = madmutt.cpkg \
+                  lib-lua.h lib-lua_priv.h \
+                  runtime.c \
+                  $(BUILT_SOURCES)
+
+noinst_HEADERS   = lib-lua.h lib-lua_priv.h
+
+lua-token.c lua-token.h: lua-token.sh
+       sh $< $@ || (rm -f $@; exit 1)
 
-noinst_HEADERS   = lib-lua.h
+DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
+       -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
+       -DHAVE_CONFIG_H=1 -DPKGDOCDIR=\"$(docdir)\"
 
 -include ../cflags.mk