sqlite3-ocaml / Makefile.in

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
  OCDOCFLAGS=-pp "cpp -traditional-cpp -DHAS_ENABLE_LOAD_EXTENSION"
else
  HAS_ENABLE_LOAD_EXTENSION=
  OCDOCFLAGS=-pp "cpp -traditional-cpp"
endif

OCFLAGS = $(OCDOCFLAGS) -w Aer -strict-sequence

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 $(OCDOCFLAGS) -html -d doc sqlite3.mli

bytecode: sqlite3.cma sqlite3top

opt: sqlite3.cmxa

test:	bytecode opt
	@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 rebuilds sqlite3top to point to the findlib-managed dll and not the
# one in .
install: sqlite3.cma sqlite3.cmxa sqlite3top
	[ -f *.so ] && SO_FILES=*.so; \
	ocamlfind install sqlite3 META sqlite3.cmi sqlite3.mli sqlite3.cma *.cmxa *.a *.cmx $$SO_FILES
	ocamlfind ocamlmktop -o sqlite3top -package "sqlite3" sqlite3.cma
	$(INSTALL) sqlite3top $(bindir)/sqlite3top

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 $(OCFLAGS) -c $<
.ml.cmo:
	ocamlc $(OCFLAGS) -c $<
.ml.cmx:
	ocamlc $(OCFLAGS) -c $*.mli
	ocamlopt -inline 20 $(OCFLAGS) -c $<
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.