-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.config.in
167 lines (143 loc) · 3.48 KB
/
Makefile.config.in
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
VERSION=@PACKAGE_VERSION@
NAME=@PACKAGE_NAME@
CFLAGS=@CFLAGS@ -fPIC -Wall -pedantic -Werror -Wno-long-long -warn-error FPSXY
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
CPPOFLAGS=@CPPOFLAGS@
OCAMLFIND=@OCAMLFIND@
DOSELIBS = _build/doselibs
BINDIR = @prefix@@bindir@
# if prefix is /usr/local (default), then we use ocamlfind,
# otherwise use build the destdir using the given prefix
ifeq (@prefix@,/usr/local)
ifeq ("@OCAML_OS_TYPE@","Win32")
LIBDIR=$(shell ocamlfind printconf destdir | cygpath -f - -m)
else
LIBDIR = $(shell ocamlfind printconf destdir)
endif
else
LIBDIR = @prefix@@libdir@/ocaml/$(shell ocamlc -version)
endif
# if DESTDIR is specified, we ignore the prefix and we use the
# default debian location
ifneq ($(DESTDIR),)
BINDIR = $(DESTDIR)@bindir@
LIBDIR = $(DESTDIR)@libdir@/ocaml
endif
INSTALL=$(OCAMLFIND) install -destdir $(LIBDIR)
UNINSTALL=$(OCAMLFIND) remove -destdir $(LIBDIR)
printconf:
@echo
@for i in "cudf re.pcre extlib ocamlgraph"; do \
m=`ocamlfind query -format "%p: %v" $$i`; \
echo "$$m\n"; \
done
@echo "DESTDIR: $(DESTDIR)"
@echo "OCAMLFIND_DESTDIR: $(OCAMLFIND_DESTDIR)"
@echo "Prefix: @prefix@"
@echo "Libdir: $(LIBDIR)"
@echo "Bindir: $(BINDIR)"
@echo "OCAML_OS_TYPE: @OCAML_OS_TYPE@"
@echo "OCAML_SYSTEM: @OCAML_SYSTEM@"
@echo "Code type: @OCAMLEXT@"
@echo "----------------------"
@echo "Install: $(INSTALL)"
@echo "Remove: $(UNINSTALL)"
@echo
ifeq ("@OCAML_OS_TYPE@","freebsd")
LDFLAGS += -fstack-protector
endif
LN = @LN@
ifeq ("@OCAML_OS_TYPE@","Win32")
EXE=.exe
else
EXE=
endif
ifeq ("@OCAMLEXT@","native")
OCAMLBUILD=@OCAMLBUILD@
ifeq ("@OCAML_SYSTEM@","mingw")
INSTALLOPTS=-s --strip-program=i686-w64-mingw32-strip
else
ifeq ("@OCAML_SYSTEM@","mingw64")
INSTALLOPTS=-s --strip-program=x86_64-w64-mingw32-strip
else
ifeq ("@OCAML_OS_TYPE@","Win32")
INSTALLOPTS=
else
INSTALLOPTS=-s
endif
endif
endif
else
OCAMLBUILD=@OCAMLBUILD@ -byte-plugin
INSTALLOPTS=
endif
OCAMLEXT=@OCAMLEXT@
TARGETS= \
distcheck.@OCAMLEXT@ \
deb-buildcheck.@OCAMLEXT@ \
ceve.@OCAMLEXT@ \
apt-cudf.@OCAMLEXT@ \
outdated.@OCAMLEXT@ \
challenged.@OCAMLEXT@ \
deb-coinstall.@OCAMLEXT@
BYTELIBS=
OPTLIBS=
CMXSLIBS=
ALIBS=
SUFFIX=cma
ifeq ("@HAS_LIBCUDF@","no")
LIBNAMES += cudf/cudf
endif
LIBNAMES += common/common \
versioning/versioning \
pef/pef \
npm/npm \
deb/debian \
opencsw/csw \
opam/opam \
algo/algo
#rpm support
ifeq ("@HAS_RPM@","yes")
LIBNAMES += rpm/rpm
endif
LIBNAMES += doseparseNoRpm/doseparseNoRpm \
doseparse/doseparse
BYTELIBNAMES=$(notdir $(LIBNAMES))
BYTELIBS=$(BYTELIBNAMES:%=$(DOSELIBS)/%.cma)
ifeq ("@HAS_LIBCUDF@","no")
installcudf:
$(MAKE) -C cudf all @OCAMLEXT@ install
uninstallcudf:
$(MAKE) -C cudf uninstall
else
installcudf:
uninstallcudf:
endif
ifeq ("@OCAMLEXT@","native")
SUFFIX += cmxa cmxs a
OPTLIBS += $(BYTELIBS:%.cma=%.cmxa)
CMXSLIBS += $(BYTELIBS:%.cma=%.cmxs)
ALIBS = $(BYTELIBS:%.cma=%.a)
endif
ifeq ("@HAS_XML@","yes")
ifeq ("@HAS_CURL@","yes")
EXPERIMENTAL += experimental/dudftocudf/deb-dudftocudf.@OCAMLEXT@
endif
endif
#ocamlgraph support
ifeq ("@HAS_OCAMLGRAPH@","yes")
TARGETS += \
strong-deps.@OCAMLEXT@ \
dominators-graph.@OCAMLEXT@
EXPERIMENTAL += strong-conflicts.@OCAMLEXT@
endif
#ocamlgraph support
ifeq ("@HAS_OCAMLGRAPH@","yes")
TARGETS += \
smallworld.@OCAMLEXT@
endif
#ounit support
ifeq ("@HAS_OUNIT@","yes")
TESTS= common versioning npm deb algo pef opam $(TEST_RPM)
endif