# cvsid: $Id: Makefile.sample.in,v 1.4.2.1 2010/07/27 13:59:35 rjs 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_CXXFLAGS = -AA
SAMPLE_LDFLAGS = 
SAMPLE_LDLIBS = 

CXXFLAGS= -I../c/include $(SAMPLE_CXXFLAGS)
LDFLAGS = -L../c/lib $(SAMPLE_LDFLAGS)
LDLIBS  = -ltet -lm $(SAMPLE_LDLIBS)


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

all: $(PROGS)

test: all
	./dumper FontReporter.pdf
	./extractor FontReporter.pdf FontReporter.txt
	./fontfilter FontReporter.pdf
	./glyphinfo FontReporter.pdf FontReporter.info.txt
	./image_resources FontReporter.pdf
	./tetml FontReporter.pdf FontReporter.tetml

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

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

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

.cpp:
	$(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $< $(LDLIBS)

