# Rename this file Makefile

# GNU makefile
# Execute with gmake on Linux and Unix systems
# Sometimes gmake is linked to make (ln -s gmake make), in which 
#   case, make and gmake work equally well
OIVHOME =  /afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/OpenInventor/2.6



# Makefile for OpenInventor 2.6 (TGS) on LINUX 



OGLHOME = /afs/cern.ch/sw/lhcxx/specific/redhat61/Mesa/3.2
MOTIFHOME = /usr/local
CC	     = /usr/local/gcc-alt-2.95.2/bin/gcc -D_GCC_
C++          = /usr/local/gcc-alt-2.95.2/bin/g++ -D_GCC_
MOTIFINCLUDES= -I$(MOTIFHOME)/include -I/usr/X11R6/include  -I/usr/include/g++
XINCLUDES    = 
GLINCLUDES   = -I$(OGLHOME)/include
MOTIFLIBS    = -L$(MOTIFHOME)/lib -L/usr/X11R6/lib -lXm -lXt -lXi -lXext -lX11 
GLLIBS       = -L$(OGLHOME)/lib -lGLU -lGL -lGLw
SYSTEM_LIBS  = -lstdc++ -lm -ldl
BUILDSO      = ld -shared 

OIV_INCLUDES = -I$(OIVHOME)/include
#include $(OIVHOME)/config/Inventor.mak

INVENTORLIBS = -L$(OIVHOME)/lib -lInventorXt -lInventor -limage

C++FLAGS = $(C++DEBUGFLAGS) $(INCLUDES) $(DEFINES)
LOCAL_LIBRARIES = $(INVENTORLIBS) $(GLLIBS) $(MOTIFLIBS) $(SYSTEM_LIBS)
INCLUDES = $(OIV_INCLUDES) $(GLINCLUDES) $(MOTIFINCLUDES)  $(XINCLUDES)

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


EXEC = oiv_Cver1
OBJS =  oiv_Cver1.o

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

.SUFFIXES: .o .cxx
.cxx.o:
	$(C++) -c $(C++FLAGS) $<

all:: $(OBJS)

PROGRAM = oiv_Cver1

clean::
	$(RM) $(OBJS)

.SUFFIXES: .o .C
.C.o:
	$(C++) -c $(C++FLAGS) $<

all:: oiv_Cver1

$(EXEC): $(OBJS)
	$(C++) -o $@ $(OBJS) $(LDLIBS) $(LOCAL_LIBRARIES)

clean::
	$(RM) $(PROGRAM)

default:: all
