My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# The target library's name
LIBRARY = plplot

# pkg-config's name for the PLplot library
PKG_CONFIG_PLPLOT = plplotd

# Commands to use for ocamlbuild and ocamlfind (in case they are not in $PATH)
OCAMLBUILD = ocamlbuild -tag debug
OCAMLFIND = ocamlfind

export CAMLIDL_LIB_DIR = -L$(shell ocamlc -where)
export CAMLIDL_LIB = -lcamlidl
export PLPLOT_CFLAGS = $(shell pkg-config --cflags ${PKG_CONFIG_PLPLOT})
export PLPLOT_LIBS = $(shell pkg-config --libs ${PKG_CONFIG_PLPLOT})
export PLPLOT_LIBS_DIRS = $(shell pkg-config --libs-only-L ${PKG_CONFIG_PLPLOT})
export PLPLOT_LIBS_LIBS = $(shell pkg-config --libs-only-l ${PKG_CONFIG_PLPLOT})

# Where ocamlbuild put the build files
BUILD_DIR = _build/

# Default to building bytecoode and native code libraries
all: byte opt

byte:
$(OCAMLBUILD) $(LIBRARY).cma

opt:
$(OCAMLBUILD) $(LIBRARY).cmxa

# (Un)Installation using ocamlfind
install:
$(OCAMLFIND) install $(LIBRARY) \
META \
$(BUILD_DIR)*plplot.cmi \
$(BUILD_DIR)*plplot.cma \
$(BUILD_DIR)*plplot.cmxa \
$(BUILD_DIR)*plplot_stubs.so \
$(BUILD_DIR)*plplot_stubs.a \
$(BUILD_DIR)*plplot.a

uninstall:
$(OCAMLFIND) remove $(LIBRARY)

# Clean up the build process using ocamlbuild
clean:
$(OCAMLBUILD) -clean

Show details Hide details

Change log

r48 by hcarty on Mar 11, 2008   Diff
* Makefile, libplplot_stubs.clib,
myocamlbuild.ml:
  - Fixes (??) to the build system.
ocamlbuild is still somewhat black
    magic to me.  The original build and
install worked for the
    toplevel but not for compiled code.
These changes seem to fix
    that problem.
Go to: 
Project members, sign in to write a code review

Older revisions

r43 by hcarty on Mar 04, 2008   Diff
* META:
  - Update to reflect that this does
not
    need Bigarray
* Makefile:
...
r32 by hcarty on Dec 28, 2007   Diff
* META, Makefile - Small update which
will (hopefully) fix the library for
  use on non-Godi camlidl installs.
findlib support for camlidl is no
  longer needed.
r15 by hcarty on Dec 07, 2007   Diff
 r92@toybox44:  hcarty | 2007-11-18
23:34:12 -0500
 * Grab the latest OCamlMakefile
version and include it locally

All revisions of this file

File info

Size: 1252 bytes, 47 lines
Hosted by Google Code