# Makefile for cg graphics: shape2d.
export ARCH = $(shell uname | sed -e 's/SunOS/SOLARIS/' -e  's/-/_/')

ifeq ($(ARCH), SOLARIS)
CXX = CC
CXXFLAGS = -O -I. -I/usr/openwin/include -I/usr/openwin/include/X11 \
	 -I../X11lib \
	-DCACHE_BITMAPS -DCACHE_SIZE_LIMIT=300 -DCACHE_FID

endif



ifeq ($(ARCH), Linux)
CXX = g++
CXXFLAGS = -O -I. -I/usr/X11R6/include/X11 \
	 -I../X11lib -fno-for-scope \
	-DCACHE_BITMAPS -DCACHE_SIZE_LIMIT=300 -DCACHE_FID
endif

OBJS = 	cgPrim.o \
	cgElist.o \
	cgCircle.o \
	cgArc.o \
	cgPieArc.o \
	cgConvex.o \
	cgEdge.o \
	cgGlist.o \
	cgLine.o \
	cgPattern.o \
	cgPoint.o \
	cgPolygon.o \
	cgScene.o \
	cgVertex.o \
	cgWinView.o \
	cgRec.o \
	cgFrameRec.o \
	cgGauge.o \
	cgString.o \
	cgXpmImage.o \
	cgVmeCrate.o \
	cgComputer.o \
	cgTapeDrive.o \
	cgTrashCan.o \
	cg2DRtPlot.o \
	cgRotString.o

.cc.o:
	rm -f $@
	$(CXX) $(CXXFLAGS) -c $< -o $@

all: $(OBJS)

clean:
	rm -f *.o *~ core main_test
