File: Makefile.in

package info (click to toggle)
ocaml-sqlite3 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 452 kB
  • sloc: ansic: 987; ml: 551; sh: 153; makefile: 95
file content (77 lines) | stat: -rw-r--r-- 1,977 bytes parent folder | download
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
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@

HAS_ENABLE_LOAD_EXTENSION=@HAS_ENABLE_LOAD_EXTENSION@
ifeq ($(HAS_ENABLE_LOAD_EXTENSION), true)
  HAS_ENABLE_LOAD_EXTENSION= -DHAS_ENABLE_LOAD_EXTENSION
  OCFLAGS=-pp "cpp -DHAS_ENABLE_LOAD_EXTENSION"
else
  HAS_ENABLE_LOAD_EXTENSION=
  OCFLAGS=-pp cpp
endif

CC=@CC@
CFLAGS=@CPPFLAGS@ @CFLAGS@ $(HAS_ENABLE_LOAD_EXTENSION) -fPIC -Wall -pedantic -Werror -Wno-long-long
LIBS=@LIBS@
LDFLAGS=@LDFLAGS@

# -linkall: all users of this library must load all our modules;
# in particular, we need sqlite3.cmo to register some exceptions.
MKLIBFLAGS=-linkall

INSTALL=@INSTALL@

all: bytecode opt docs test

docs:
	if [ ! -d doc ]; then mkdir doc; fi
	ocamldoc $(OCFLAGS) -html -d doc sqlite3.mli

bytecode: sqlite3.cma sqlite3top

opt: sqlite3.cmxa

test:
	@cd test && $(MAKE) all

clean:
	@cd test && $(MAKE) clean
	rm -f *.o *.cmo *.cmx *.cmi *.so *.cma *.cmxa *.a sqlite3top

distclean: clean
	rm -rf autom4te.* config.* META Makefile doc

install: sqlite3.cma
	[ -f *.so ] && SO_FILES=*.so; \
	ocamlfind install sqlite3 META sqlite3.cmi sqlite3.mli sqlite3.cma $(wildcard *.cmxa *.a *.cmx) $$SO_FILES

remove: uninstall
uninstall:
	ocamlfind remove sqlite3
	rm -f $(bindir)/sqlite3top

update: sqlite3.cma
	ocamlfind remove sqlite3
	make install

sqlite3top: sqlite3.cma
	ocamlfind ocamlmktop -o sqlite3top sqlite3.cma

sqlite3.cma: sqlite3.cmo sqlite3_stubs.o
	ocamlmklib -o sqlite3 -oc sqlite3_stubs sqlite3.cmo sqlite3_stubs.o -L. $(LDFLAGS) $(LIBS) $(MKLIBFLAGS)

sqlite3.cmxa: sqlite3.cmx sqlite3.o sqlite3_stubs.o
	ocamlmklib -o sqlite3 -oc sqlite3_stubs sqlite3.cmx sqlite3_stubs.o -L. $(LDFLAGS) $(LIBS) $(MKLIBFLAGS)

sqlite3.cmo: sqlite3.cmi sqlite3.ml

.SUFFIXES: .ml .mli .cmo .cmi .cmx

.mli.cmi:
	ocamlc -w A -warn-error A $(OCFLAGS) -c $<
.ml.cmo:
	ocamlc -w A -warn-error A $(OCFLAGS) -c $<
.ml.cmx:
	ocamlc -w A -warn-error A $(OCFLAGS) -c $*.mli
	ocamlopt -w A -warn-error A -inline 20 $(OCFLAGS) -c $<