Commits

Markus Mottl committed d346aae

Added stricter compilation flags

Comments (0)

Files changed (2)

 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 -traditional-cpp -DHAS_ENABLE_LOAD_EXTENSION"
+  OCDOCFLAGS=-pp "cpp -traditional-cpp -DHAS_ENABLE_LOAD_EXTENSION"
 else
   HAS_ENABLE_LOAD_EXTENSION=
-  OCFLAGS=-pp "cpp -traditional-cpp"
+  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@
 
 docs:
 	if [ ! -d doc ]; then mkdir doc; fi
-	ocamldoc $(OCFLAGS) -html -d doc sqlite3.mli
+	ocamldoc $(OCDOCFLAGS) -html -d doc sqlite3.mli
 
 bytecode: sqlite3.cma sqlite3top
 
 .SUFFIXES: .ml .mli .cmo .cmi .cmx
 
 .mli.cmi:
-	ocamlc -w A -warn-error A $(OCFLAGS) -c $<
+	ocamlc $(OCFLAGS) -c $<
 .ml.cmo:
-	ocamlc -w A -warn-error A $(OCFLAGS) -c $<
+	ocamlc $(OCFLAGS) -c $<
 .ml.cmx:
-	ocamlc -w A -warn-error A $(OCFLAGS) -c $*.mli
-	ocamlopt -w A -warn-error A -inline 20 $(OCFLAGS) -c $<
+	ocamlc $(OCFLAGS) -c $*.mli
+	ocamlopt -inline 20 $(OCFLAGS) -c $<
 opt: $(TESTS:%.ml=%.exe)
 
 %.bc: %.ml
-	ocamlc -w Ae -warn-error Ae -I .. -dllpath .. str.cma sqlite3.cma $< -o $@
+	ocamlc -w Aer -strict-sequence -I .. -dllpath .. str.cma sqlite3.cma $< -o $@
 
 %.exe: %.ml
-	ocamlopt -w Ae -warn-error Ae -I .. str.cmxa sqlite3.cmxa $< -o $@
+	ocamlopt -w Aer -strict-sequence -I .. str.cmxa sqlite3.cmxa $< -o $@
 
 clean:
 	rm -f \