Files
ovh-ttyrec-bash-recorder/Makefile.in
Stéphane Lesimple 0c7ab93b71 release v1.1.6.6
chore: add machine triplet in -V
chore: add rpm autobuild
chore: multi-arch autobuild
2020-11-13 18:55:32 +01:00

52 lines
1.4 KiB
Makefile

CC = %CC%
CFLAGS = -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I/usr/local/include %CFLAGS% $(RPM_OPT_FLAGS)
LDFLAGS = -L/usr/local/lib
LDLIBS = %LDLIBS%
BINARIES = ttyrec ttyplay ttytime
BIN = $(DESTDIR)/usr/bin
.PHONY: all deb rpm clean distclean style dist install test
all: $(BINARIES)
deb:
dpkg-buildpackage -b -rfakeroot -us -uc
rpm: clean
o=$$PWD && t=$$(mktemp -d) && cd $$t && mkdir ovh-ttyrec && rsync -a --exclude=.git $$o/ ovh-ttyrec/ && zip -9r ~/rpmbuild/SOURCES/master.zip ovh-ttyrec
rpmbuild -bb ovh-ttyrec.spec
ls -lh ~/rpmbuild/RPMS/*/ovh-ttyrec*.rpm
ttyrec: ttyrec.o io.o compress.o %COMPRESS_ZSTD%
$(CC) $(CFLAGS) -o $@ ttyrec.o io.o compress.o %COMPRESS_ZSTD% $(LDFLAGS) $(LDLIBS) %PTHREAD%
ttyplay: ttyplay.o io.o compress.o %COMPRESS_ZSTD%
$(CC) $(CFLAGS) -o $@ ttyplay.o io.o compress.o %COMPRESS_ZSTD% $(LDFLAGS) $(LDLIBS)
ttytime: ttytime.o io.o compress.o %COMPRESS_ZSTD%
$(CC) $(CFLAGS) -o $@ ttytime.o io.o compress.o %COMPRESS_ZSTD% $(LDFLAGS) $(LDLIBS)
clean:
rm -f *.o $(BINARIES) ttyrecord *~
distclean: clean
rm -f Makefile configure.h
style:
uncrustify -c uncrustify.cfg -l C --no-backup *.h *.c
dist:
tar cvzf ttyrec.tar.gz *.c *.h docs/ debian/ configure Makefile.in uncrustify.cfg
install:
install -d $(BIN)
install ttyrec $(BIN)
install ttyplay $(BIN)
install ttytime $(BIN)
install -m 0644 -D -t $(DESTDIR)/usr/share/man/man1/ docs/*
test: all
./ttyrec -V