lsyncd/Makefile.am
Axel Kittenberger f3df2d7b80
2010-11-17 13:58:31 +00:00

44 lines
923 B
Makefile

AUTOMAKE_OPTIONS = foreign
CFLAGS = -Wall $(LIBLUA_CFLAGS)
bin_PROGRAMS = lsyncd
lsyncd_SOURCES = lsyncd.c lsyncd.lua
lsyncd_LDADD = $(LIBLUA_LIBS)
exampledir = $(datarootdir)/doc/@PACKAGE@
dist_example_DATA = \
examples/lbash.lua \
examples/limagemagic.lua \
examples/lrsync.lua \
examples/lrsyncssh.lua
TESTS = tests/l4-rsync-data.sh
if RUNNER
# installs the runner
runnerdir = $(RUNNER_DIR)
runner_DATA = lsyncd.lua
else
# or compiles it into the binary
lsyncd: luac.o $(lsyncd_LDADD)
objarch: | lsyncd.o
objdump -f lsyncd.o | grep architecture | \
sed -e "s/,.*$$//" -e "s/[^ ]* \(.*\)/\1/" > $@ || rm $@
objtarget: | lsyncd.o
objdump -f lsyncd.o | grep "file format" | \
sed -e "s/.* \(.*\)/\1/" > $@ || rm $@
luac.o: luac.out objarch objtarget
objcopy --input-target=binary \
--output-target=`cat objtarget` \
--binary-architecture=`cat objarch` $< $@
luac.out: lsyncd.lua
luac $<
endif