Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c00aac9511e40e4946e24ea6485133f4 > files > 101

ocaml-glmlite-devel-0.03.35-1mdv2010.0.i586.rpm

# +-------------------------------------------------------------------+
# | This file contains compile rules to build a wraper to the OpenGL. |
# +-------------------------------------------------------------------+
# | Copyright (C) 2006  Florent Monnier  <fmonnier@linux-nantes.org>  |
# +-------------------------------------------------------------------+
# |                                                                   |
# | This program is free software; you can redistribute it and/or     |
# | modify it under the terms of the GNU General Public License       |
# | as published by the Free Software Foundation; either version 2    |
# | of the License, or (at your option) any later version.            |
# |                                                                   |
# | This program is distributed in the hope that it will be useful,   |
# | but WITHOUT ANY WARRANTY; without even the implied warranty of    |
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.              |
# | See the GNU General Public License for more details.              |
# |                                                                   |
# | You should have received a copy of the GNU General Public License |
# | along with this program ;                                         |
# | if not, write to the Free Software Foundation, Inc.,              |
# | 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA      |
# |                                                                   |
# +-------------------------------------------------------------------+
# | You can find the GNU General Public License on the internet too:  |
# | http://www.fsf.org/licensing/licenses/gpl.html                    |
# +-------------------------------------------------------------------+

OCAMLOPT=ocamlopt

# GL_WRAPER_PATH := $(PREFIX)
  GL_WRAPER_PATH := "+glMLite"

all: test

SExprLite.cma:  SExprLite.cmi SExprLite.cmo
	$(OCAMLC) -a -o SExprLite.cma SExprLite.cmo

SExprLite.cmx: SExprLite.ml
	$(OCAMLOPT) -c SExprLite.ml

SExprLite.cmxa:  SExprLite.cmi SExprLite.cmx
	$(OCAMLOPT) -a -o SExprLite.cmxa SExprLite.cmx


# COMPILES A DEMO
# default demo to compile:
DEMO=demo_sexpr.ml
DEMO_OPT := $(patsubst %.ml,%.opt, $(DEMO))

# there are more modules than needed by the default demo,
# so that make can be called with DEMO defined with another demo, for example:
# make DEMO=outline.ml
$(DEMO_OPT):  $(DEMO)   SExprLite.cmxa
	$(OCAMLOPT)  -o $@              \
	    -ccopt -L$(GL_WRAPER_PATH)  \
	    -I $(GL_WRAPER_PATH)        \
	    GL.cmxa Glu.cmxa Glut.cmxa  \
	    FunGL.cmxa  FunGlut.cmxa    \
	    vertArray.cmxa              \
	    jpeg_loader.cmxa            \
	    png_loader.cmxa             \
	    svg_loader.cmxa             \
	    ftgl.cmxa                   \
	    str.cmxa  bigarray.cmxa     \
	    SExprLite.cmxa              \
	    $<

# test

test: test-opt

test-opt: $(DEMO_OPT)
	./$(DEMO_OPT)


clean:
	rm -f *.[oa] *.cm[ixoa] *.cmxa *.opt

cleaner: clean
	rm -f *~

# vim: fdm=marker