~ubuntu-branches/ubuntu/vivid/parmap/vivid-proposed

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Package Import Robot
  • Author(s): Mehdi Dogguy
  • Date: 2014-10-06 11:19:20 UTC
  • Revision ID: package-import@ubuntu.com-20141006111920-oxtffbtrfmt9xktt
Tags: upstream-1.0~rc4
ImportĀ upstreamĀ versionĀ 1.0~rc4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
VERSION=@PACKAGE_VERSION@
 
2
NAME=@PACKAGE_NAME@
 
3
 
 
4
CFLAGS=@CFLAGS@ -fPIC -Wall -pedantic -Werror -Wno-long-long
 
5
CPPFLAGS=@CPPFLAGS@
 
6
LDFLAGS=@LDFLAGS@
 
7
 
 
8
OCAMLFIND=@OCAMLFIND@
 
9
OCAMLBUILD=@OCAMLBUILD@
 
10
 
 
11
datarootdir = @datarootdir@
 
12
prefix = @prefix@
 
13
exec_prefix = @exec_prefix@
 
14
 
 
15
ifeq ($(DESTDIR),)
 
16
LIBDIR=$(shell ocamlfind printconf destdir)
 
17
BINDIR=@bindir@
 
18
MANDIR=@mandir@/man3
 
19
INSTALL = $(OCAMLFIND) install
 
20
UNINSTALL = $(OCAMLFIND) remove
 
21
else
 
22
export OCAMLLIBDIR := lib/ocaml
 
23
LIBDIR=$(DESTDIR)/$(OCAMLLIBDIR)
 
24
BINDIR=$(DESTDIR)/bin
 
25
MANDIR=$(DESTDIR)/man/man3
 
26
INSTALL = $(OCAMLFIND) install -destdir $(LIBDIR)
 
27
UNINSTALL = $(OCAMLFIND) remove -destdir $(LIBDIR)
 
28
endif
 
29
 
 
30
 
 
31
ifeq ("@OCAMLBEST@","opt")
 
32
  OCAMLBEST=native
 
33
else
 
34
  OCAMLBEST=byte
 
35
endif
 
36
 
 
37
DIST_DIR = $(NAME)-$(VERSION)
 
38
DIST_TARBALL = $(DIST_DIR).tar.gz
 
39
 
 
40
OBFLAGS = -j 10 -use-ocamlfind #-classic-display
 
41
#OBFLAGS += $(OBFLAGS) -tag debug -tag profile
 
42
 
 
43
BYTELIBS = parmap.cma
 
44
OPTLIBS=
 
45
CMXSLIBS=
 
46
ALIBS=
 
47
 
 
48
ifeq ("@OCAMLBEST@","opt")
 
49
  OPTLIBS += $(BYTELIBS:%.cma=%.cmxa)
 
50
  CMXSLIBS += $(BYTELIBS:%.cma=%.cmxs)
 
51
endif
 
52
 
 
53
ALIBS = $(BYTELIBS:%.cma=%.a)
 
54
 
 
55
all:
 
56
        $(OCAMLBUILD) $(OBFLAGS) $(BYTELIBS) $(OPTLIBS) $(CMXSLIBS) $(ALIBS)
 
57
 
 
58
fast: 
 
59
        $(OCAMLBUILD) $(OBFLAGS) $(OPTLIBS)
 
60
 
 
61
TESTS = \
 
62
  tests/simplescale.$(OCAMLBEST) \
 
63
  tests/floatscale.$(OCAMLBEST) \
 
64
  tests/simplescale_array.$(OCAMLBEST) \
 
65
  tests/simplescalefold.$(OCAMLBEST) \
 
66
  tests/simplescalemapfold.$(OCAMLBEST)
 
67
 
 
68
tests:
 
69
        $(OCAMLBUILD) $(OBFLAGS) $(TESTS)
 
70
 
 
71
EXAMPLES = \
 
72
  example/mandels.$(OCAMLBEST)
 
73
 
 
74
examples:
 
75
        $(OCAMLBUILD) $(OBFLAGS) $(EXAMPLES)
 
76
 
 
77
 
 
78
INSTALL_STUFF = META 
 
79
INSTALL_STUFF += $(wildcard _build/*.cma _build/*.cmxa _build/*.cmxs)
 
80
INSTALL_STUFF += $(filter-out $(wildcard _build/myocamlbuild.*),$(wildcard _build/*.mli _build/*.cmi))
 
81
INSTALL_STUFF += $(wildcard _build/*.so _build/*.a)
 
82
 
 
83
install: $(LIBS) META
 
84
        test -d $(LIBDIR) || mkdir -p $(LIBDIR)
 
85
        test -d $(LIBDIR)/stublibs || mkdir -p $(LIBDIR)/stublibs
 
86
        $(INSTALL) -patch-version $(VERSION) $(NAME) $(INSTALL_STUFF)
 
87
        (cd _build; ocamldoc -man -man-mini parmap.ml parmap.mli)
 
88
        test -d $(MANDIR) || mkdir -p $(MANDIR)
 
89
        cp -a _build/Parmap.3o $(MANDIR)
 
90
 
 
91
uninstall:
 
92
        $(UNINSTALL) $(NAME)
 
93
        rm -f $(MANDIR)/Parmap.3o
 
94
 
 
95
doc:
 
96
        $(OCAMLBUILD) $(OBFLAGS) $(NAME).docdir/index.html $(NAME).docdir/index.dot
 
97
        dot -Grotate=0 -Tsvg -o $(NAME).docdir/index.svg $(NAME).docdir/index.dot
 
98
 
 
99
clean:
 
100
        $(OCAMLBUILD) -clean
 
101
 
 
102
dist: ./$(DIST_TARBALL)
 
103
./$(DIST_TARBALL):
 
104
        if [ -d ./$(DIST_DIR)/ ] ; then rm -rf ./$(DIST_DIR)/ ; fi
 
105
        if [ -d ./$(DIST_TARBALL) ] ; then rm -f ./$(DIST_TARBALL) ; fi
 
106
        if [ -d .svn ]; then \
 
107
          svn export . ./$(DIST_DIR) ; \
 
108
        else \
 
109
          mkdir ./$(DIST_DIR)/ ;\
 
110
          git archive --format=tar HEAD | \
 
111
          tar -x -C ./$(DIST_DIR)/ ; \
 
112
        fi
 
113
        for f in $(DIST_EXCLUDE) ; do rm -rf ./$(DIST_DIR)/$$f; done
 
114
        tar cvzf ./$(DIST_TARBALL) ./$(DIST_DIR)
 
115
        rm -rf ./$(DIST_DIR)
 
116
        @echo "Distribution tarball: ./$(DIST_TARBALL)"
 
117
 
 
118
.PHONY: all fast install clean dist examples tests