mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-11-15 17:37:07 +00:00
47 lines
970 B
Makefile
47 lines
970 B
Makefile
AUTOMAKE_OPTIONS = foreign
|
|
CFLAGS = -Wall $(LIBLUA_CFLAGS)
|
|
bin_PROGRAMS = lsyncd
|
|
lsyncd_SOURCES = lsyncd.c lsyncd.lua inotify.c
|
|
lsyncd_LDADD = $(LIBLUA_LIBS)
|
|
exampledir = $(datarootdir)/doc/@PACKAGE@
|
|
dist_example_DATA = \
|
|
examples/lbash.lua \
|
|
examples/lecho.lua \
|
|
examples/lgforce.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_LDADD += luac.o
|
|
|
|
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
|
|
|