#
# Makefile for the part of Plageo used in Ipe
#
# this is not the full Plageo distribution --- see PLAGEO.README for details
#
# you may need to set INCLUDE for your system's include directories,
# and you have to decide whether you need ranlib or not
# (see `man ar' and `man ranlib' for that)
#

# C++ compiler
CC	= g++
# define GFLAGS if you use g++
#GFLAGS  =
GFLAGS	= -fno-for-scope

INCLUDE = -I.
CFLAGS  = $(GFLAGS) -O $(INCLUDE)

# for systems where `ar' creates a symbol table (sgi, hp700, dec alpha)
RANLIB = ar t

# for systems where `ranlib' is needed to create a symbol table (sun)
#RANLIB = ranlib

#
#----------------------------------------------------------------------
#

# .C suffix is not know to sun make
.SUFFIXES: .C

OBJS   = pl_base.o pl_transform.o pl_intervals.o pl_onedim.o pl_pgn.o \
	pl_round.o pl_coincidence.o pl_distance.o\
	pl_stdrr.o pl_edgerr.o pl_pgnrr.o

libplageo.a: $(OBJS)
	ar r libplageo.a $(OBJS)
	$(RANLIB) libplageo.a

.C.o:
	$(CC) $(CFLAGS) -c $<

clean:
	-rm -fr $(OBJS) libplageo.a
