-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.orig
119 lines (112 loc) · 4.8 KB
/
Makefile.orig
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
# DINAMICA is software for not only solving systems of nonlinear Ordinary
# Differential Equations, but for finding various distinctive functioning regimes of
# nonlinear systems. These regimes are steady states and periodic regimes,
# homogeneous and inhomogeneous states, inphase and antiphase oscillations and much
# more. Determining of those regimes based only on numerical entities not on
# visualized data. Thus no graphics environment is needed(such as X11). The program
# uses various numerical algorithms from GNU Scientific Library(GSL). Additionaly,
# there are many stochastic procedures in the program ranging from Stochastic
# Simulation Algorithm (Gillespie) to the Langevin equation. Stochastic routines are
# also used in various numerical techniques.
#***************************************************************************************
# Copyright 2008,2009,2010,2011,2012,2013 Elias Potapov.
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
# 2008, 2009, 2010, 2011 The GSL Team.
#***************************************************************************************
# This file is part of DINAMICA.
# DINAMICA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# DINAMICA 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. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with DINAMICA. If not, see <http://www.gnu.org/licenses/>.
#**************************************************************************************
#**************************************************************************************
# Original author is Elias Potapov <[email protected]>
# Lomonosov Moscow State University, Biophysics Dep..
# Tampere University of Technology, Dep. of Signal Processing
# Moscow, Russia / Tampere, Finland
#**************************************************************************************
NAME= dinamica
#We have alpha version
VER=0
SUBVER=.9
CC= gcc
LIBS= -lgsl -lgslcblas -lm
CFLAGS= -g -Wall
LDFLAGS= -L/opt/local/lib
CPPFLAGS= -I/opt/local/include
CASFLAGS= -g -c
CSOFLAGS= -c -fPIC
DINOBJ= lib/din/din_main.o lib/din/read_ode.o
LIBOBJ= lib/main.o lib/solver.o lib/input_interpreter.o lib/cross.o \
lib/integrator.o lib/init.o lib/trajectory.o lib/continue.o \
lib/random.o lib/read_config.o lib/submenu.o lib/singularity.o \
lib/ode.o lib/lyapunov.o lib/file.o lib/graph.o lib/gnuplot_i.o
HEADERS= src/init.h src/din.h src/errors.h src/continue.h src/random.h \
src/thistogram.h src/singularity.h src/trajectory.h \
src/lyapunov.h src/graph.h src/gnuplot_i.h
ODES= ode/bruss.ode ode/bruss2.ode ode/lorenz.ode ode/repGilODE.ode ode/single.ode \
ode/ts.ode
RM= rm -f
CP= cp
TAR= tar
TARFLAGS= -cv
GZ= gzip
LIBDIR= lib/
DINLIBDIR= lib/din/
SRCDIR= src/
INSTDIR= /usr/local/bin/
AR= ar
ARFLAGS= rcs
ALIBNAME= libdin.a
SOLIBNAME= libdin.so
LIBNAME= $(ALIBNAME)
LIBINSTDIR= /usr/local/lib/
#Compiling DINAMICA
$(NAME): $(DINOBJ) $(ALIBNAME)
@echo "Compiling DINAMICA ..."
$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) $(DINOBJ) -o $(NAME) $(LIBS)
$(DINLIBDIR)%.o: $(SRCDIR)%.c $(HEADERS)
$(CC) $(CASFLAGS) $(CPPFLAGS) $< -o $@
######################
#Creating static library
$(ALIBNAME): $(LIBOBJ)
@echo "Creating DINAMICA library (libdin.a)..."
$(AR) $(ARFLAGS) $(ALIBNAME).$(VER)$(SUBVER) $(LIBOBJ)
ln -fs $(ALIBNAME).$(VER)$(SUBVER) $(ALIBNAME)
$(LIBDIR)%.o: $(SRCDIR)%.c $(HEADERS)
$(CC) $(CASFLAGS) $(CPPFLAGS) $< -o $@
######################
#Creating shared library
#$(SOLIBNAME): $(LIBOBJ)
# @echo "Creating DINAMICA library (libdin.so)"
# $(CC) -shared -Wl,libdin.so -o $(SOLIBNAME).$(VER)$(SUBVER) $(LIBOBJ)
# ln -fs $(SOLIBNAME).$(VER)$(SUBVER) $(SOLIBNAME)
#$(LIBDIR)%.o: $(SRCDIR)%.c $(HEADERS)
# $(CC) $(CSOFLAGS) $(CPPFLAGS) $< -o $@
#
.PHONY: clean remove archive install
remove:
@echo "Removing dinamica executable..."
$(RM) $(NAME)
clean:
@echo "Cleaning unnecessary files..."
$(RM) $(LIBOBJ) $(DINOBJ) $(SRCDIR)*~ $(LIBDIR)*~ $(DINLIBDIR)*~
archive:
@echo "Cleaning unnecessary files..."
$(RM) $(LIBOBJ) $(DINOBJ) $(LIBDIR)*~ $(DINLIBDIR)*~
@echo "TARing files..."
$(TAR) $(TARFLAGS) -f $(NAME)$(VER)$(SUBVER).tar $(SRCDIR)*.c $(SRCDIR)*.h $(LIBDIR) $(ODES) Makefile ChangeLog TODO COPYING README
@echo "GZIPing files..."
$(GZ) $(NAME)$(VER)$(SUBVER).tar
install:
@echo "Installing $(LIBNAME)..."
$(CP) $(LIBNAME).$(VER)$(SUBVER) $(LIBINSTDIR)
ln -fs $(LIBINSTDIR)$(LIBNAME).$(VER)$(SUBVER) $(LIBINSTDIR)$(LIBNAME)
@echo "Installing $(NAME)..."
$(CP) $(NAME) $(INSTDIR)