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
|
## @configure_input@
##
## @file Makefile
## @brief Builds the C# example programs
## @author Akiya Jouraku
##
## <!--------------------------------------------------------------------------
## This file is part of libSBML. Please visit http://sbml.org for more
## information about SBML, and the latest version of libSBML.
##
## Copyright (C) 2013-2018 jointly by the following organizations:
## 1. California Institute of Technology, Pasadena, CA, USA
## 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
## 3. University of Heidelberg, Heidelberg, Germany
##
## Copyright (C) 2009-2013 jointly by the following organizations:
## 1. California Institute of Technology, Pasadena, CA, USA
## 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
##
## Copyright (C) 2006-2008 by the California Institute of Technology,
## Pasadena, CA, USA
##
## Copyright (C) 2002-2005 jointly by the following organizations:
## 1. California Institute of Technology, Pasadena, CA, USA
## 2. Japan Science and Technology Agency, Japan
##
## 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. A copy of the license agreement is provided
## in the file named "LICENSE.txt" included with this software distribution
## and also available online as http://sbml.org/software/libsbml/license.html
## ------------------------------------------------------------------------ -->
# -----------------------------------------------------------------------------
# # Configuration variables
# -----------------------------------------------------------------------------
# Some of the following are substituted automatically by `configure'. If
# you are looking at "Makefile", do not edit these values; instead, run the
# configure script at the top level of the src tree. It will recreate
# "Makefile".
#
include @top_srcdir@/config/makefile-common-vars.mk
# `srcdir' points to the current directory, but should be set by configure.
# `subdir' must be set manually to the relative dir under srcdir. Don't
# set `subdir' to an absolute path, or some make actions will fail.
srcdir = @srcdir@
thisdir = examples/csharp
#
# DLL of libSBML C# proxy classes
#
csproxy_lib = ../../src/bindings/csharp/libsbmlcsP.dll
#
# command line options for Mono
#
ifeq (Mono,$(findstring Mono,$(shell $(CSHARP_COMPILER) --version 2>&1)))
CSC_OPT_SHARED = -target:library
CSC_OPT_EXE = -target:exe
CSC_OPT_OUTPUT = -out:
CSC_OPT_REF = -r:
endif
#
# command line options for Portable.NET
#
# (*NOTICE*)
# Currently (2008-07-25), runtime implementation of Portable.NET (ilrun)
# doesn't seem to work for libSBML C# binding.
# Although C# DLL can be built by cscc, a segmentation fault happens
# when an executable file is launched by ilrun.
#
ifeq (cscc,$(findstring cscc,$(shell $(CSHARP_COMPILER) --version 2>&1)))
CSC_OPT_SHARED = -shared
CSC_OPT_EXE =
CSC_OPT_OUTPUT = -o
CSC_OPT_REF = -l
endif
#
# Target C# source files (and the corresponding .exe files)
#
cs_files = $(wildcard *.cs)
exe_files = $(cs_files:.cs=.exe)
all: Makefile check_csproxy_lib $(exe_files)
check_csproxy_lib:
ifeq "@USE_CSHARP@" ""
@echo "libSBML must be configured with --with-csharp to use the C# bindings."
exit 1
else
@if ! test -f "$(csproxy_lib)"; then \
echo ;\
echo "[ERROR] $(csproxy_lib) doesn't exist." ; \
echo "Please build $(csproxy_lib) in ../../src/bindings/csharp/ directory."; \
exit 1 ; \
fi;
endif
# The following is the generic rule for making a .exe file from one of
# the .csfiles in this directory.
$(exe_files) : %.exe: %.cs
"$(CSHARP_COMPILER)" $(CSC_OPT_EXE) $(CSC_OPT_OUTPUT)$@ $(CSC_OPT_REF)$(csproxy_lib) $<
# The rest of the commands here are general-purpose things.
clean:
-rm -f $(exe_files) *~
distclean: clean
-rm Makefile
# The following are generic 'make' targets that are not used in
# this simple examples directory.
check dist docs install install-docs uninstall \
mostlyclean maintainer-clean installcheck dvi pdf ps info html \
distcheck:
# ----------------------------------------------------------------------------
# Miscellaneous
# ----------------------------------------------------------------------------
include @top_srcdir@/config/makefile-common-actions.mk
# ----------------------------------------------------------------------------
#End.
# ----------------------------------------------------------------------------
|