CC       = cc
CFLAGS   = -g
#
#  Set the location of both the fonts and the texttoobj program here.
#  NOTE: if FONTDEST is different from "$(WF_LBIN_DIR)/fonts/" then
#  ALTFONTPATH must be defined here and on line 46 in texttoobj.c.
#
BINDEST  = /usr/local/wave/lbin
FONTDEST = /usr/local/wave/lbin/fonts
# DEFINES  = -DALTFONTPATH

all: ascii pstoobj texttoobj

ascii: ascii.c
	$(CC) $(CFLAGS) -o ascii ascii.c

pstoobj: pstoobj.c
	$(CC) $(CFLAGS) -o pstoobj pstoobj.c

texttoobj: texttoobj.c
	$(CC) $(CFLAGS) $(DEFINES) -o texttoobj texttoobj.c

fonts: pstoobj
	pstoobj FontOutlines/courier-bold.ps
	pstoobj FontOutlines/courier-boldoblique.ps
	pstoobj FontOutlines/courier-oblique.ps
	pstoobj FontOutlines/courier.ps
	pstoobj FontOutlines/helvetica-bold.ps
	pstoobj FontOutlines/helvetica-boldoblique.ps
	pstoobj FontOutlines/helvetica-oblique.ps
	pstoobj FontOutlines/helvetica.ps
	pstoobj FontOutlines/symbol.ps
	pstoobj FontOutlines/times-bold.ps
	pstoobj FontOutlines/times-bolditalic.ps
	pstoobj FontOutlines/times-italic.ps
	pstoobj FontOutlines/times.ps

install: texttoobj fonts
	cp OBJECTS/* $(FONTDEST)
	cp texttoobj $(BINDEST)

clean:
	rm -f OBJECTS/* ascii pstoobj texttoobj
