CXX = /usr/bin/g++.exe
EXEEXT = 
RPATHCMD = -Wl,-rpath -Wl,/usr/lib
PKG_ENV = PKG_CONFIG_PATH=/usr/lib/pkgconfig

all: example0.ps example1.ps example2.ps

example0$(EXEEXT): MissingGlyphExample.cpp 
	$(CXX) -o $@ $< \
	$(RPATHCMD) `$(PKG_ENV) pkg-config --cflags --libs lasi`

example0.ps: example0$(EXEEXT)
	./$< $@

example1$(EXEEXT): SimpleLASiExample.cpp 
	$(CXX) -o $@ $< \
	$(RPATHCMD) `$(PKG_ENV) pkg-config --cflags --libs lasi`

example1.ps: example1$(EXEEXT)
	./$< $@

example2$(EXEEXT): ComplexTextLayoutExample.cpp 
	$(CXX) -o $@ $< \
	$(RPATHCMD) `$(PKG_ENV) pkg-config --cflags --libs lasi`

example2.ps: example2$(EXEEXT)
	./$< $@

clean:
	rm example0$(EXEEXT) example0.ps \
	example1$(EXEEXT) example1.ps \
	example2$(EXEEXT) example2.ps

.PHONY: all clean
