From 9ac7ad2d3206a8d0b039a38ea138a4db1bb54f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Wi=C3=9Fmann?= <uni@thorsten-wissmann.de> Date: Thu, 3 Oct 2013 23:04:39 +0200 Subject: [PATCH] Make system-includes and C++-Linker configurable Include minisat- and caml-includes via #include <..> to make their location in the file system configurable --- Makefile | 7 ++++--- minisat_stub.cc | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index d48aee9..11defae 100644 --- a/Makefile +++ b/Makefile @@ -29,12 +29,14 @@ PROGS := coalg coalgcompare LIBS := unix str SOURCESMLI := $(wildcard *.mli) SOURCESML := $(wildcard *.ml) +INCS ?= -I/usr/include -I/usr/lib/ocaml +CXXFLAGS += -Wall -Werror $(INCS) +LDXX ?= g++ OCAMLC := ocamlc.opt OCAMLCFLAGS := OCAMLOPT := ocamlopt.opt -OCAMLOPTFLAGS := -unsafe -inline 100 - +OCAMLOPTFLAGS := -cc $(LDXX) -unsafe -inline 100 # No more user input beyond this point. @@ -56,7 +58,6 @@ LIBS := $(patsubst %,%$(SUFFIXLIB),$(LIBS)) LIBSMLI := $(patsubst %.mli,%.cmi,$(SOURCESMLI)) LIBSML := $(patsubst %.ml,%$(SUFFIX),$(SOURCESML)) - .PHONY: all all: $(MAKE) $(PARALLEL) $(PROGS) diff --git a/minisat_stub.cc b/minisat_stub.cc index 4711e81..2a8e1f8 100644 --- a/minisat_stub.cc +++ b/minisat_stub.cc @@ -2,14 +2,14 @@ #define __STDC_FORMAT_MACROS extern "C" { - #include "caml/mlvalues.h" - #include "caml/alloc.h" - #include "caml/memory.h" - #include "caml/custom.h" + #include <caml/mlvalues.h> + #include <caml/alloc.h> + #include <caml/memory.h> + #include <caml/custom.h> } //#include "minisat2/Solver.h" -#include "minisat/core/Solver.h" +#include <minisat/core/Solver.h> // using namespace Minisat; -- GitLab