# /usr/share/doc/symmetrica-doc/examples/Makefile
#
# Ad hoc Makefile for building and playing with the sample sources
# distributed within the debian package symmetrica-doc.
#
# Recommended usage:
#  create a dedicated folder somewhere in your HOME directory;
#  link all the files in /usr/share/doc/symmetrica-doc/examples
#  in the dedicated folder;
#  launch this Makefile in the dedicated folder:
#  $ make ;
#  for a basic cleanup, consider the clean target:
#  $ make clean ;
#  for an entire cleanup, the maintainer-clean target:
#  $ make maintainer-clean ;
#  for other targets, just read the Makefile.
#
# written for Debian by Jerome Benoit <calculus@rezozer.net>
# on behalf of the Debian Math Team
# copyright: 2016-2022 Jerome Benoit <calculus@rezozer.net>
# distributed under the terms and conditions of the ISC license.
#

PROGRAMS = $(patsubst %.c,%,$(wildcard *.c))

default: all

LDLIBS = -lsymmetrica

all: build

build: $(PROGRAMS)

check: build check-sample

check-sample: sample sample.tst sample.ans
	./sample 2> /dev/null < sample.tst | diff -u sample.ans -

clean:
	$(RM) $(PROGRAMS)

maintainer-clean: clean
