headers=$(wildcard *.h)
sources=$(wildcard *.c)
objects=$(patsubst %.c,%.o,$(sources))

CC=@CC@
CFLAGS=@CFLAGS@ -Wall
LIBS=@LIBS@
LDFLAGS=@LDFLAGS@
OMNITTY_VERSION=@PACKAGE_VERSION@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
mandir=@mandir@

CFLAGS+=-DOMNITTY_VERSION=\"$(OMNITTY_VERSION)\"

omnitty: $(objects)
	$(CC) $(CFLAGS) -o omnitty $(objects) $(LDFLAGS) $(LIBS)

-include .depends

.depends: $(sources) $(headers)
	$(CC) $(CFLAGS) -MM $(sources) >.depends

clean:
	rm -f *.o .depends omnitty

distclean: clean
	rm -rf autom4te.cache config.status config.log Makefile

pristine: distclean
	rm -f configure

install: omnitty
	mkdir -p $(DESTDIR)$(bindir)
	cp omnitty $(DESTDIR)$(bindir)
	mkdir -p $(DESTDIR)$(mandir)/man1
	cp omnitty.1 $(DESTDIR)$(mandir)/man1

.PHONY: distclean clean pristine



syntax highlighted by Code2HTML, v. 0.9.1