forked from pramodk/nrn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
153 lines (130 loc) · 4.66 KB
/
Makefile.am
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
142
143
144
145
146
147
148
149
150
151
152
153
## This is the top level Makefile.am.
#AUTOMAKE_OPTIONS = foreign dist-zip dist-tarZ
AUTOMAKE_OPTIONS = foreign dist-zip
ACLOCAL_AMFLAGS = -I m4
host_cpu = @host_cpu@
NVER = $(PACKAGE_VERSION)
if NMODL_ONLY
SUBDIRS = src
else
SUBDIRS = src bin share
endif
#
# Install libtool; it's needed to compile the "special" program.
#
pkgdata_SCRIPTS = libtool
## Unfortunately nrnconf.h is architecture dependent so the standard
## installation of it does not allow multiarchitectures,
## i.e the following is wrong.
## pkginclude_HEADERS = nrnconf.h
## So we do it as data
libobjdir = $(libdir)
libobj_DATA = nrnconf.h
CONFIGURE_DEPENDENCIES = m4/acx_mpi.m4 m4/ivcheck.m4 m4/java_support.m4 \
m4/nrnjava.m4 m4/nrnpython.m4 m4/nrnrt.m4 \
m4/oddities.m4 m4/parcon.m4 m4/readline.m4 \
m4/withmpi.m4 m4/nrnbg.m4
EXTRA_DIST = $(CONFIGURE_DEPENDENCIES) installunix.html build.sh \
nrnversion.sh git2nrnversion_h.sh \
extend_depcomp.sh Copyright
if BUILD_PARANEURON
PARANEURON='yes'
else
PARANEURON='no'
endif
if BUILD_CYGWIN
#install from the build directories to the mswin destination
#uses the classical positions of files
mswin:
top_srcdir=$(top_srcdir) marshal_dir=$(marshal_dir) \
top_builddir=$(top_builddir) \
ivbindir=$(IV_LIBDIR)/../bin \
CC=$(CC) \
host_cpu=$(host_cpu) \
$(top_srcdir)/src/mswin/batch/instal.sh
endif
if BUILD_MINGW
#install from the build directories to the mswin destination
#uses the classical positions of files
mswin:
top_srcdir=$(top_srcdir) marshal_dir=$(marshal_dir) \
top_builddir=$(top_builddir) \
ivbindir=$(IV_LIBDIR)/../bin \
CC=$(CC) \
PARANEURON=$(PARANEURON) \
host_cpu=$(host_cpu) \
$(top_srcdir)/src/mswin/batch/instalmingw.sh
endif
if BUILD_NRNPYTHON
install-exec-hook:
echo "enter install-exec-hook in nrn/Makefile.am"
if test "@ac_pysetup@" != "no" ; then \
cd src/nrnpython ; \
$(PYTHON) setup.py install @ac_pysetup@ ;\
fi
if test "@ac_diagnose@" != "no" ; then \
sh bin/nrndiagnose.sh ; \
fi
echo "leave install-exec-hook in nrn/Makefile.am"
endif
ALPHADIR = [email protected]:/home/htdocs/ftp/neuron/versions/alpha
if MAKE_RPMS
rpm: @RPM_TARGET@
.PHONY: rpm
$(RPM_TARGET): $(DISTFILES) nrnrpm.spec
(cd $(libdir) ; strip -d *.so*)
(cd @IV_LIBDIR@ ; strip -d *.so*)
-rm $(pkgdatadir)/demo/neuron
(cd $(pkgdatadir)/demo/release ; $(bindir)/nrnivmodl ; cd $(host_cpu) ; rm -f *.c *.o *.lo *.mod *.la ; cd ../.. ; ln -s release/$(host_cpu)/special neuron )
-mkdir -p `dirname $(RPM_TARGET)`
(cd `dirname $(RPM_TARGET)` && rm -f nrn*.deb nrn*.rpm)
ln -s / /tmp/nrnrpmbld
$(RPM_PROG) -bb --buildroot /tmp/nrnrpmbld nrnrpm.spec
@echo Congratulations, $(RPM_TARGET) "(and friends) should now exist."
(cd `dirname $(RPM_TARGET)` && alien --to-deb $(RPM_TARGET))
rpmdist:
scp $(RPM_TARGET) $(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh describe)`".$(host_cpu).rpm
scp `dirname $(RPM_TARGET)`/nrn*.deb $(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh describe)`".$(host_cpu).deb
else
endif
if MAC_DARWIN
ivlibdir = @IV_LIBDIR@
after_install:
carbon="@enable_carbon@" sh $(srcdir)/src/mac/after-install.sh "$(host_cpu)" "$(prefix)" "$(top_srcdir)" "$(ivlibdir)"
dmg:
carbon="@enable_carbon@" sh $(srcdir)/src/mac/mkdmg.sh NEURON-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`"
pkg:
$(srcdir)/src/mac/nrn_x11_opt2usr.sh $(prefix) $(host_cpu)
/usr/local/bin/packagesbuild $(top_builddir)/src/mac/macdist.pkgproj
$(srcdir)/src/mac/nrnproductsign.sh $(top_builddir)/src/mac/build/NEURON-$(NVER).pkg
alphadist:
if UniversalMacBinary
a=$(ALPHADIR)/nrn-"``(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh describe)`"-MacOSX"`sw_vers -productVersion`".dmg && \
echo $$a && \
scp $(HOME)/NEURON-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`".dmg "$$a"
else
a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh describe)`".$(host_cpu)-osx.pkg &&\
b=$(top_builddir)/src/mac/build/NEURON-$(NVER).pkg &&\
echo "scp $$b $$a" && \
scp $$b $$a
endif
else
if BUILD_CYGWIN
alphadist:
a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh describe)`".$(host)-setup.exe &&\
echo $$a && \
scp src/mswin/nrn"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 3)`"setup.exe $$a
else
if BUILD_MINGW
alphadist:
a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh describe)`".$(host)-setup.exe && \
echo $$a && \
scp src/mswin/nrn"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh 3)`"setup-$(host_cpu).exe $$a
else
alphadist:
a=$(ALPHADIR)/nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh describe)`".tar.gz && \
echo $$a && \
scp nrn-"`(export NSRC='$(srcdir)' ; sh $(srcdir)/nrnversion.sh)`".tar.gz $$a
endif
endif
endif