File: Makefile.PL.in

package info (click to toggle)
libsbml 5.10.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 141,800 kB
  • ctags: 98,793
  • sloc: cpp: 804,405; xml: 206,907; ansic: 66,144; cs: 52,916; java: 25,093; python: 23,449; sh: 9,847; perl: 8,414; makefile: 7,580; ruby: 4,760; csh: 3
file content (141 lines) | stat: -rw-r--r-- 4,542 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
## @configure_input@
##
## \file    Makefile.PL
## \brief   Perl-specific SWIG directives for wrapping libSBML API
## \author  TBI {xtof,raim}@tbi.univie.ac.at
##

##
## Copyright 2004 TBI
##
## This library is free software; you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License as published
## by the Free Software Foundation; either version 2.1 of the License, or
## any later version.
##
## This library is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
## MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  The software and
## documentation provided hereunder is on an "as is" basis, and the
## California Institute of Technology and Japan Science and Technology
## Corporation have no obligations to provide maintenance, support,
## updates, enhancements or modifications.  In no event shall the
## California Institute of Technology or the Japan Science and Technology
## Corporation be liable to any party for direct, indirect, special,
## incidental or consequential damages, including lost profits, arising
## out of the use of this software and its documentation, even if the
## California Institute of Technology and/or Japan Science and Technology
## Corporation have been advised of the possibility of such damage.  See
## the GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this library; if not, write to the Free Software Foundation,
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## The original code contained here was initially developed by:
##
##     Christoph Flamm and Rainer Machne
##     Institut fuer Theoretische Chemie
##     Universitaet Wien
##     Waehringerstrasse 17/3/308
##     A-1090 Wien, Austria


use ExtUtils::MakeMaker;
use Config;

$lddlfags = "@LDFLAGS@ ";
if ("@host_os@" eq "cygwin")
{
  $lddlflags .= "-shared";
}
else
{
  $lddlflags .= "$Config{lddlflags}";
}

WriteMakefile(
              NAME        => "LibSBML",
	      PREFIX      => "@prefix@",
              MAKEFILE    => 'Makefile-perl',
              LIBS        => "@XERCES_LDFLAGS@ @EXPAT_LDFLAGS@ @LIBXML_LDFLAGS@ @XERCES_LIBS@ @EXPAT_LIBS@ @LIBXML_LIBS@ @ZLIB_LIBS@ @BZ2_LIBS@ @LIBS@ -lm",
              LDDLFLAGS   => $lddlflags,
              CC          => "@CXX@",
	      CCFLAGS     => "@PERL_CPPFLAGS@ @CXXFLAGS@",
              INC         => "-I../swig -I../../sbml -I../.. -I../../../include",
              MYEXTLIB    => "../../libsbml.la",
              macro       => {USE_SWIG => q[@USE_SWIG@]},
              OBJECT      => "LibSBML_wrap.o",
	      MAN1PODS    => {},
	      MAN3PODS    => {},
              AUTHOR      => "Christoph Flamm <xtof@tbi.univie.ac.at>",
              VERSION     => "@PACKAGE_VERSION@",
);

package MY;
sub postamble {
	return <<'MAKE_FRAG';

extra_sources  = \
  LibSBML.i \
  local.cpp \
  local.i \
  list_get_fix.i \
  list_of_fix.i

swig_sources =      \
  $(extra_sources)  \
  ../swig/libsbml.h \
  ../swig/libsbml.i

PACKAGE_ARGS=

ifeq ("@USE_COMP@", "1")
	PACKAGE_ARGS += -DUSE_COMP
	SWIGDOCDEFINES += --define USE_COMP
endif

ifeq ("@USE_FBC@", "1")
	PACKAGE_ARGS += -DUSE_FBC
	SWIGDOCDEFINES += --define USE_FBC
endif

ifeq ("@USE_LAYOUT@", "1")
	PACKAGE_ARGS += -DUSE_LAYOUT
	SWIGDOCDEFINES += --define USE_LAYOUT
endif

ifeq ("@USE_QUAL@", "1")
	PACKAGE_ARGS += -DUSE_QUAL
	SWIGDOCDEFINES += --define USE_QUAL
endif

main_sources = \
  $(shell grep '%include sbml' ../swig/libsbml.i | grep -v 'libsbml-version.h' \
    | cut -f2- -d'/' | sed -e 's,^,../../sbml/,g')

LibSBML.pm: LibSBML_wrap.cxx

LibSBML_wrap.cxx: LibSBML.pod $(swig_sources)
	@top_srcdir@/config/chk_swig_version.sh || exit
	@SWIG@ @SWIGFLAGS@ -c++ -perl5 -proxy $(PACKAGE_ARGS) -I../../../include -I../.. LibSBML.i 

LibSBML.pod: $(main_sources) ../swig/libsbml.i ../swig/swigdoc.py
	../swig/swigdoc.py --language perl --top ../../.. $(SWIGDOCDEFINES) \
		--master ../swig/libsbml.i --output LibSBML.pod

MYPACKLIST = $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist
#MYPERLLOCAL = $(INSTALLARCHLIB)/perllocal.pod
myuninstall:
	$(NOECHO) dirs=`cat $(MYPACKLIST) | xargs -n 1 dirname`; \
	$(PERLRUN) -MExtUtils::Install -e \
	  'uninstall('\''$(MYPACKLIST)'\',1,0')'; \
	for d in $$dirs; do \
          if test -d $$d && test -n "`find $$d -maxdepth 0 -empty`"; then \
	    echo rmdir $$d; \
	    rmdir $$d; \
          fi; \
        done; 
MAKE_FRAG
}
# End of file