File: demos_makefile

package info (click to toggle)
ocaml-gnuplot 0.8.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 508 kB
  • sloc: ml: 2,148; makefile: 185
file content (66 lines) | stat: -rw-r--r-- 1,986 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From: Ralf Treinen <treinen@debian.org>
Date: Wed, 4 Sep 2019 14:10:12 +0200
Subject: make Makefile selfcontaining so that it can be used to compile

 demos outside of the ocaml-gnuiplot source tree.
---
 demos/Makefile | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/demos/Makefile b/demos/Makefile
index c6e52b5..141ea80 100644
--- a/demos/Makefile
+++ b/demos/Makefile
@@ -2,19 +2,23 @@
 # ocaml-gnuplot/demos
 # Copyright (C) Christophe TROESTLER
 
-include ../Makefile.conf
 
-OCAMLFLAGS 	= -I ../
-OCAMLOPTFLAGS	= -I ../
-WEBDIR		= ../../webpublishing
-WEBDIRDOC	= $(WEBDIR)/Gnuplot
+# OCAMLC, OCAMLOPT, OCAMLDEP, OCAMLDOC
+# The location of the OCaml compiler and tools. The defaults should be OK.
+#
+OCAMLC	 = ocamlc
+OCAMLOPT = ocamlopt
+OCAMLDEP = ocamldep
+OCAMLDOC = ocamldoc
+OCAMLFIND = ocamlfind
+
+OCAMLFLAGS 	= -I +gnuplot
+OCAMLOPTFLAGS	= -I +gnuplot
 
 DEMOS_LIBS 	= parse_args.ml
 DEMOS 		= $(wildcard ex*.ml)
 
-PKGS 	= $(shell grep "requires" ../META.in | \
-		sed -e "s/.*\"\([^\"]*\)\".*/\1/")
-PKGS 	+= gnuplot
+PKGS 	 = unix bigarray gnuplot
 PKGS_CMA = $(addsuffix .cma, $(PKGS))
 
 .PHONY: demos byte opt
@@ -23,15 +27,15 @@ demos: byte
 byte: $(DEMOS:.ml=.exe)
 opt: $(DEMOS:.ml=.com)
 
-ex%.exe: ex%.ml ../gnuplot.cma $(DEMOS_LIBS:.ml=.cmo)
+ex%.exe: ex%.ml $(DEMOS_LIBS:.ml=.cmo)
 	$(OCAMLC) -o $@ $(OCAMLFLAGS) $(PKGS_CMA) $(DEMOS_LIBS:.ml=.cmo) $<
-ex%.com: ex%.ml ../gnuplot.cmxa $(DEMOS_LIBS:.ml=.cmx)
+ex%.com: ex%.ml $(DEMOS_LIBS:.ml=.cmx)
 	$(OCAMLOPT) -o $@ $(OCAMLOPTFLAGS) $(PKGS_CMA:.cma=.cmxa) \
 	  $(DEMOS_LIBS:.ml=.cmx) $<
 
-parse_args.cmi: parse_args.mli ../gnuplot.cmi
-parse_args.cmo: parse_args.ml parse_args.cmi ../gnuplot.cma
-parse_args.cmx: parse_args.ml parse_args.cmi ../gnuplot.cmxa
+parse_args.cmi: parse_args.mli
+parse_args.cmo: parse_args.ml parse_args.cmi
+parse_args.cmx: parse_args.ml parse_args.cmi
 
 # Caml general dependencies
 .SUFFIXES: .ml .mli .cmo .cmi .cmx