# Makefile for PDFlib utilities
# $Id: Makefile.in,v 1.12 2001/03/29 09:12:56 tm Exp $

LIBPDF		= lib@PDFLIBNAME@
SHELL		= @SHELL@
INSTALL		= @INSTALL@
INSTALL_DATA	= @INSTALL_DATA@
LIBPDF		= lib@PDFLIBNAME@

srcdir 		= @srcdir@
top_builddir = ..

VPATH = @srcdir@

LIBS	= @PDFLIBLINK@

EXE	= @EXEEXT@
OBJ	= @OBJEXT@
CC	= @CC@
RM      = @RM@
LIBTOOL	= ../libtool --silent

# installation directories
prefix = @prefix@
exec_prefix = @exec_prefix@

# directories for the final library and include files for PDFlib users
libdir = @libdir@
includedir = @includedir@

CFLAGS = -c @DEFS@ @DEFINES@ -I../pdflib

.SUFFIXES: .c .$(OBJ) .lo

.c.lo:
	$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $<

.c.$(OBJ):
	$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $<

SRC	= \
	compile_metrics.c

OBJS	= \
	compile_metrics.lo

PROGS	= \
	compile_metrics$(EXE)

all:	$(PROGS)

.PHONY: clean

clean:
	-$(RM) *.$(OBJ) *.lo *.la $(PROGS) *.bak .libs

distclean: clean
	-$(RM) Makefile.in.bak

compile_metrics$(EXE):	compile_metrics.lo ../pdflib/$(LIBPDF).la
	$(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

depend:
	cp Makefile.in Makefile.in.bak
	sed '/^# Automatically generated dependencies/q' Makefile.in.bak >Makefile.in
	$(CC) $(CFLAGS) -MM $(SRC) | sed 's/\.o:/.lo:/g' >>Makefile.in

# Automatically generated dependencies
compile_metrics.lo: compile_metrics.c ../pdflib/p_intern.h \
 ../pdflib/pdflib.h ../pdflib/p_config.h ../pdflib/p_font.h
