1 # perl4caml configuration -*- Makefile -*-
2 # Copyright (C) 2003 Merjis Ltd.
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this library; see the file COPYING. If not, write to
16 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
19 # $Id: Makefile.config,v 1.27 2008-03-01 13:02:21 rich Exp $
22 # Directory containing the Perl include files, eg. <EXTERN.h>.
24 PERLINCDIR := $(shell perl -MConfig -e 'print "$$Config{archlib}/CORE"')
27 # This is where we will install perl4caml (actually in the /perl subdirectory
28 # of this, so you will need to add '-I +perl' when compiling programs).
30 OCAMLLIBDIR := $(shell ocamlc -where)
33 # You can specify extra flags to be passed to gcc here.
35 # One flag you might want to pass here is
37 # -DPERL4CAML_REFCOUNTING_EXPERIMENTAL=1
39 # which will turn on experimental support for reference counting.
40 # Without this none of the Perl structures that you allocate will get
41 # freed. With this we try to map Perl's reference counting onto
42 # OCaml's garbage collection by using finalizers. Although the
43 # feature is marked "EXPERIMENTAL", I have fixed most of the bugs
44 # and it's now turned on by default.
47 EXTRA_CFLAGS := -DPERL4CAML_REFCOUNTING_EXPERIMENTAL=1
48 #EXTRA_CFLAGS := -I/Users/rich/OCaml/lib/ocaml/std-lib
52 # XXX Hack required by ocamlopt, and sometimes ocamlc.
53 # To work out what this should be, try:
54 # `perl -MExtUtils::Embed -e ldopts'
56 DYNALOADER_HACK := $(shell perl -MExtUtils::Embed -e ldopts | egrep -o '/[^[:space:]]*DynaLoader.a')
57 #DYNALOADER_HACK := /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
58 #DYNALOADER_HACK := /System/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a