#=======================================================================
#@V@:Note: This file generated by vgen V1.00 (10:45:42 AM 12 Sep 1996).
#=======================================================================

CC	=	g++

ARCH	= linux
#ARCH	= sun4
#ARCH	= sgi

Arch = $(ARCH)

ifeq ($(Arch),i586)
Arch = linux
endif
ifeq ($(Arch),i486)
Arch = linux
endif

# Platform specific definitions

# Linux
ifeq ($(Arch),linux)
X11INC	=	/usr/X11/include
X11LIB	=	/usr/X11R6/lib
LIBS	=	-lV -lVgl -lGLw -lGLU -lGL -lXm -lXmu -lXt -lXext -lX11
endif

# Sun4 - unm
ifeq ($(Arch),sun4)
X11INC	=	/usr/local/X11/include
X11LIB	=	/usr/local/X11/lib
LIBS	=	-lV -lGLw -lGLU -lGL -lXaw -lXmu -lXt -lXext -lX11
endif

# sgi - unm
ifeq ($(Arch),sgi)
X11INC	=	/usr/include
X11LIB	=	/usr/lib
LIBS	=	-lV -lGLw -lGLU -lGL -lXaw -lXmu -lXt -lXext -lX11
endif


HOMEV	=	/usr/local/v
VLibDir	=	$(HOMEV)/lib
oDir	=	.
Bin	=	.

VPATH	=	$(HOMEV)/include

#--------------------------------------------------------------
# Architecture dependent

# Flags for includes and libraries

CFLAGS	=	-O -I$(X11INC) -I$(HOMEV)/include

LFLAGS	=	-O -L$(X11LIB) -L$(VLibDir)

EXOBJS	=	$(oDir)/tglapp.o \
		$(oDir)/tglcnv.o \
		$(oDir)/tglcmdw.o

all:	$(Bin)/shapes

objs:	$(EXOBJS)

clean:
	rm $(EXOBJS)

$(Bin)/shapes:	$(EXOBJS)
	$(CC) -o $@ $(LFLAGS) $(EXOBJS) $(LIBS)

$(oDir)/tglcnv.o:	tglcnv.cpp tglcnv.h
	$(CC) -c $(CFLAGS) -o $@ $<

$(oDir)/tglcmdw.o:	tglcmdw.cpp tglcmdw.h
	$(CC) -c $(CFLAGS) -o $@ $<

$(oDir)/tglapp.o:	tglapp.cpp tglapp.h tglcmdw.h
	$(CC) -c $(CFLAGS) -o $@ $<
