# cvsid: $Id: Makefile.sample.in,v 1.5.2.2 2010/07/27 10:06:05 tm Exp $
#
# sample Makefile for TET applications
#
# tested with gmake, so if your make does not work properly try to use gmake

RM      = rm -f

CXX = aCC
SAMPLE_CFLAGS = +DA2.0W
SAMPLE_LDFLAGS = +DA2.0W
SAMPLE_LDLIBS = 

CFLAGS  = -I./include $(SAMPLE_CFLAGS)
LDFLAGS = -L./lib $(SAMPLE_LDFLAGS)
LDLIBS  = -ltet -lm $(SAMPLE_LDLIBS)

PROGS	= \
	dumper \
	extractor \
	fontfilter \
	get_attachments \
	glyphinfo \
	image_resources \
	tetml

all: $(PROGS)

test: $(PROGS)
	./dumper FontReporter.pdf
	./extractor FontReporter.pdf FontReporter.txt
	./fontfilter FontReporter.pdf
	./tetml FontReporter.pdf FontReporter.tetml
	./get_attachments FontReporter.pdf attachments.txt
	./image_resources FontReporter.pdf
	./glyphinfo FontReporter.pdf FontReporter.info.txt


clean:
	$(RM) $(PROGS) *.o attachments.txt FontReporter.tetml FontReporter.pdf
	$(RM) FontReporter.txt FontReporter.info.txt FontReporter.pdf.*.tif

#  As we need a C++ linker change the default rules how to create executables
.SUFFIXES:
.SUFFIXES: .c

.c:
	$(CXX) -o $@ $(CFLAGS) $(LDFLAGS) $< $(LDLIBS)
