lsyncd/Makefile.am
Axel Kittenberger 830bade7a4
2010-11-13 08:50:30 +00:00

29 lines
609 B
Makefile

AUTOMAKE_OPTIONS = foreign
CFLAGS = -Wall $(LIBLUA_CFLAGS)
bin_PROGRAMS = lsyncd
lsyncd_SOURCES = lsyncd.c
lsyncd_LDADD = $(LIBLUA_LIBS)
if RUNNER
# installs the runner
runnerdir = $(RUNNER_DIR)
runner_DATA = lsyncd.lua
else
# or compiles it into the binary
lsyncd: luac.o $(lsyncd_LDADD)
architecture: | lsyncd.o
objdump -f $< | grep architecture | sed -e "s/,.*$$//" -e "s/[^ ]* \(.*\)/\1/" > $@ || rm architecture
luac.o: luac.out architecture
objcopy --input-target=binary --output-target=`gcc -dumpmachine` --binary-architecture=`cat architecture` $< $@
luac.out: lsyncd.lua
luac $<
endif