1# Process this file with automake to produce Makefile.in (in this, 2# and all subdirectories). 3# 4# Makefile for the top-level directory of GNU teseq. 5# Copyright (C) 2008 Micah Cowan. 6# 7# This program is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 3, or (at your option) 10# any later version. 11# 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program. If not, see <http://www.gnu.org/licenses/>. 19 20AUTOMAKE_OPTIONS = subdir-objects 21# AM_CFLAGS=-Wall -g -O2 -ansi -pedantic-errors 22 23bin_PROGRAMS = teseq 24dist_bin_SCRIPTS = reseq 25 26teseq_SOURCES = src/teseq.c src/inputbuf.c src/ringbuf.c src/putter.c \ 27 src/csi.c \ 28 src/sgr.h src/csi.h src/inputbuf.h src/ringbuf.h src/putter.h \ 29 src/c1.h src/teseq.h src/modes.h 30 31if DO_CHECK_TESTS 32 check_PROGRAMS = src/test-ringbuf src/test-inputbuf 33 check_DATA = src/test-inputbuf.inf 34 TESTS = $(check_PROGRAMS) 35endif 36src_test_ringbuf_SOURCES = src/test-ringbuf.c src/ringbuf.c 37src_test_ringbuf_CFLAGS = @libcheck_CFLAGS@ 38src_test_ringbuf_LDADD = @libcheck_LIBS@ 39src_test_inputbuf_SOURCES = src/test-inputbuf.c src/inputbuf.c src/ringbuf.c 40src_test_inputbuf_LDADD = @libcheck_LIBS@ 41src_test_inputbuf_CFLAGS = @libcheck_CFLAGS@ 42 43info_TEXINFOS = doc/teseq.texi 44doc_teseq_TEXINFOS = doc/fdl.texi 45dist_man_MANS = doc/teseq.1 doc/reseq.1 46 47SUFFIXES = .cm 48 49doc/teseq.1: src/teseq.c 50 $(HELP2MAN) ./teseq -o doc/teseq.1 -n "Format text with terminal escapes and control sequences for human consumption." 51 52doc/reseq.1: ./reseq.in 53 $(HELP2MAN) ./reseq -o doc/reseq.1 -n "Reverse the translations made by teseq." 54 55.cm.c: 56 $(CHECKMK) $< > $@ || ( rm -f $@ && false ) 57 58check: check-teseq check-reseq check-seqs 59 60check-teseq: teseq run-tests 61 ./run-tests 62 63check-reseq: reseq run-tests 64 ./run-tests -r 65 66check-seqs: teseq 67 TESEQ=$(builddir)/teseq $(srcdir)/exercise-seqs 68 69EXTRA_DIST=src/test-inputbuf.inf exercise-seqs 70 71dist-hook: 72 cp -R -- `find $(srcdir)/tests -type d ! -name tests` $(distdir)/tests 73 74clean-local: 75 find tests -name r-output -o -name output | xargs rm -f 76 rm -f tests/cmdline--/-o 77 rm -f tests/timing/timing-out 78 test "$(srcdir)" = . || rm -f src/test-inputbuf.inf 79 rm -f doc/teseq.1 doc/reseq.1 80 81CLEANFILES = teseq.dvi 82