##########################################################################
# $Id: Makefile,v 1.00 2003/06/16 23:44:51 csiebholz Exp $
#
# Makefile -- for building crtfont
#
# Copyright (C) by Carsten Siebholz (c.siebholz@t-online.de>


##########################################################################
# CONFIGURATION (change to your needs before doing "make all")
#

ifndef INSTALLBINDIR
  INSTALLBINDIR=/usr/local/bin
endif

#-------------------------------------------------------------------------
# General settings:
#       Specify install paths and compiler flags

# Compiler/linker settings
CC = g++
LD = ld
EXTRA_CFLAGS = -O2 -Wall -Woverloaded-virtual
EXTRA_LDFLAGS =


##########################################################################
# STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP
# You shouldn't need to edit anything beyond this line!
#

#-------------------------------------------------------------------------
# Target configuration

PRGNAME = crtfont
VERSION = 0.1.3
ARCHIVE = $(PRGNAME)-$(VERSION)

CFLAGS = $(EXTRA_CFLAGS)
LDFLAGS = $(EXTRA_LDFLAGS)
DEFINES =
OBJS = $(PRGNAME).o





#-------------------------------------------------------------------------
# Main Targets

all:    $(PRGNAME)

install:$(PRGNAME)
	install -d $(INSTALLBINDIR)
	install -m 755 -o root -g root -s $(PRGNAME) $(INSTALLBINDIR)

uninstall:
	rm -f $(INSTALLBINDIR)/$(PRGNAME)

clean:
	@-rm -f $(PRGNAME) *.o *.tgz core* *~

dist:	clean
	tar -C .. -czf ../$(ARCHIVE).tgz $(ARCHIVE)
	tar -tzf ../$(ARCHIVE).tgz
	@echo Distribution package created as $(ARCHIVE).tgz


#-------------------------------------------------------------------------
# Core Targets

$(PRGNAME): $(OBJS)
		$(CC) $(LDFLAGS) -o $(PRGNAME) $(OBJS)

%.o: %.c
	$(CC) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $<

##########################################################################
# EOF
#	
