 #
 # $Id: Makefile.cpp,v 1.2 1997/08/26 14:39:02 emmanuel Exp $
 #






































### The VRcaML  library version 1.0

### Configuration section





MLC=camlc
MLCFLAGS=-c  -O cautious
MLLIBR=camllibr
MLDEP=camldep
MLEXTOBJ=zo
MLEXTOBJI=zi
MLEXTOBJL=zo

LIBNAME=VRcaML
LIBLOAD=_LIBLOAD
FILETEST= _FILETEST

 ##### Destination files for installation

LIBDIR=/usr/local/lib/caml-light
BINDIR=_BINDIR
TEXDIR=_TEXDIR

LIBLOAD=_LIBLOAD

VERSION=1.0b

 ##### Copying commands

CP=cp
LN=ln -s                # or just `ln', if you don't have symbolic links
INSTALL=install -c
MV=mv

 ### End of configuration section


OBJS=compatibility.$(MLEXTOBJ) default.${MLEXTOBJ} constants.${MLEXTOBJ} exceptions.${MLEXTOBJ} basic_types.${MLEXTOBJ} font.${MLEXTOBJ} fonts.${MLEXTOBJ} colors.${MLEXTOBJ} vrml_objects_pre.${MLEXTOBJ} calc_3D.${MLEXTOBJ} vrml_objects_post.${MLEXTOBJ} positionables.${MLEXTOBJ} geometrics.${MLEXTOBJ}  geometric_properties.${MLEXTOBJ} map.${MLEXTOBJ} complex_geometrics.${MLEXTOBJ} map_complex.${MLEXTOBJ} lights.${MLEXTOBJ} map_light.${MLEXTOBJ} sound.${MLEXTOBJ} frame_manipulations.${MLEXTOBJ} specials.${MLEXTOBJ} world.${MLEXTOBJ} translate.${MLEXTOBJ} animations.${MLEXTOBJ} traject.${MLEXTOBJ}
 

library:	$(LIBNAME).$(MLEXTOBJI) $(OBJS) $(LIBNAME).$(MLEXTOBJ)
	( mv $(LIBNAME).zo _$(LIBNAME).zo ; $(MLLIBR) -o $(LIBNAME).$(MLEXTOBJ) $(OBJS) _$(LIBNAME).$(MLEXTOBJ))

clean:
	rm -f *.$(MLEXTOBJ) *.$(MLEXTOBJI) *.$(MLEXTOBJL) *.gz

test:
	make -e LIBDIR=./packagedir install
	$(MLC) -o $(FILETEST).exe $(LIBNAME).$(MLEXTOBJL) test.ml $(FILETEST).ml
	$(FILETEST).exe

install:
	if test -d $(LIBDIR); then :; else mkdir $(LIBDIR); fi
	$(INSTALL) -m 755 $(LIBNAME).$(MLEXTOBJ) $(LIBDIR)
	$(INSTALL) -m 755 $(LIBNAME).$(MLEXTOBJI) $(LIBDIR)
	$(INSTALL) -m 755 $(LIBNAME).$(MLEXTOBJL) $(LIBDIR)
	$(INSTALL) -m 755 $(LIBLOAD) $(LIBDIR)

uninstall:
	rm $(LIBDIR)/$(LIBNAME).$(MLEXTOBJ)
	rm $(LIBDIR)/$(LIBNAME).$(MLEXTOBJI)
	rm $(LIBDIR)/$(LIBNAME).$(MLEXTOBJL)
	rm $(LIBDIR)/$(LIBLOAD)

#packagebin:
#make clean
#make -e LIBDIR=/usr/local/lib/caml-light
#make -e LIBDIR=./packagedir install
	_MAKE_MLPACKAGEBIN

packagesrc:
	make clean
	mkdir ../${LIBNAME}-${VERSION}
	cp * ../${LIBNAME}-${VERSION}
	(cd .. ; tar -cvf ${LIBNAME}-${VERSION}.tar ./${LIBNAME}-${VERSION})
	rm -rf ../${LIBNAME}-${VERSION}
	gzip ../${LIBNAME}-${VERSION}.tar
	

.IGNORE:
		
.SUFFIXES :
.SUFFIXES : .mli .ml .$(MLEXTOBJI) .$(MLEXTOBJ)

.mli.$(MLEXTOBJI):
	$(MLC) $(MLCFLAGS) $<

.ml.$(MLEXTOBJ):
	$(MLC) $(MLCFLAGS) $<

depend:
	mv Makefile Makefile.bak; sed -n -e '1,/^### DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile;  $(MLDEP) *.mli *.ml >> Makefile;



### EVERYTHING THAT GOES BEYOND THIS COMMENT IS GENERATED
### DO NOT DELETE THIS LINE
