lsyncd/Makefile.am

29 lines
609 B
Makefile
Raw Normal View History

2010-10-14 13:52:01 +00:00
AUTOMAKE_OPTIONS = foreign
2010-10-14 13:56:23 +00:00
CFLAGS = -Wall $(LIBLUA_CFLAGS)
2010-10-14 13:52:01 +00:00
bin_PROGRAMS = lsyncd
2010-10-26 20:29:12 +00:00
lsyncd_SOURCES = lsyncd.c
2010-10-14 13:52:01 +00:00
lsyncd_LDADD = $(LIBLUA_LIBS)
2010-10-26 20:29:12 +00:00
if RUNNER
2010-11-13 08:50:30 +00:00
# installs the runner
runnerdir = $(RUNNER_DIR)
runner_DATA = lsyncd.lua
2010-10-26 20:29:12 +00:00
else
2010-11-13 08:50:30 +00:00
# or compiles it into the binary
2010-10-26 20:29:12 +00:00
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 $<
2010-11-13 08:50:30 +00:00
2010-10-26 20:29:12 +00:00
endif