-
Notifications
You must be signed in to change notification settings - Fork 43
/
makedefs.in
251 lines (196 loc) · 7.43 KB
/
makedefs.in
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# -*- makefile -*-
# this file should get included by each Makefile in NEMO
# ONLY EDIT THIS FILE IF IT'S $NEMOLIB/makedefs
# diff $NEMO/makedefs $NEMOLIB
# ((the one in $NEMO is the configure generated one that gets copied))
# ((to $NEMOLIB via the "make config_extra" command during the))
# (("make build1" step of the install))
# Note that the falcON tools (e.g. gyrfalcON) do not use this file.
# See the $NEMO/usr/dehnen/utils/make.* files to figure out how
# to tune these tools. Walter did a pretty darn good job, see if you
# beat that!
# DSO linking: might need to wrap offending libraries
# -Wl,--no-as-needed -lX11 -Wl,-as-needed
# instead of
# -lX11
# Another option is to add -Wl,--no-as-needed to CFLAGS
# This is the current default in configure (to use it)
# Comment the next line if you do not want this, or use --without-dso
NEMO_CFLAGS1 = @DSO_LINK@
# handy for recursion
@SET_MAKE@
# Compilers:
CC = @CC@
FC = @F77@
F77 = @F77@
CXX = @CXX@
# HDF4 library
#HDF_INC=-I/local/include -I/usr/local/include -I/usr/include/hdf
#HDF_LIB=-ldf -ljpeg -lz -lsz
HDF_INC = @HDF_INC@
HDF_LIB = @HDF_LIB@
# HDF5 library: -lhdf5
# --with-hdf5-incdir= --with-hdf5-libdir=
#HDF5_INC = `pkg-config --cflags hdf5`
#HDF5_LIB = `pkg-config --libs hdf5`
HDF5_INC = @HDF5_INC@
HDF5_LIB = @HDF5_LIB@
# PNG library
#PNG_LIB = `pkg-config --libs libpng`
PNG_LIB = @PNG_LIB@
# CFITSIO library: -lcfitsio -lcurl -lz -lbz2
#CFITSIO_INC = `pkg-config --cflags cfitsio`
#CFITSIO_LIB = `pkg-config --libs cfitsio`
CFITSIO_INC = @CFITSIO_INC@
CFITSIO_LIB = @CFITSIO_LIB@
# NETCDF4 library: -lnetcdf
#NETCDF_INC = `pkg-config --cflags netcdf`
#NETCDF_LIB = `pkg-config --libs netcdf`
NETCDF_INC = @NETCDF_INC@
NETCDF_LIB = @NETCDF_LIB@
# MIRIAD library
MIRIAD_INC = @MIRIAD_INC@
MIRIAD_LIB = @MIRIAD_LIB@
# GSL library: -lgsl -lgslcblas -lm
#GSL_INC = @GSL_CFLAGS@
#GSL_LIB = @GSL_LIBS@
GSL_INC =
GSL_LIB =
# PLPLOT: -lplplot
#PLPLOT_INC = -I/usr/include/plplot
#PLPLOT_LIB = -lplplot
PLPLOT_INC = @PLPLOT_CFLAGS@
PLPLOT_LIB = @PLPLOT_LIBS@
# FFTW
# -lfftw3, or -lfftw3f or -lfftw3l (depending on precision library, for float or long double)
# [actually still not used yet]
#FFTW_CFLAGS = @FFTW_CFLAGS@
#FFTW_LIBS = @FFTW_LIBS@
FFTW_INC =
FFTW_LIB =
# READLINE
RDL_LIBS = @RDL_LIBS@
# LOADOBJ stuff; -DMACH=.....
MACH = @LOADOBJ_MACH@
# Fortran: you need FLIBS if you link using 'cc' and link
# with (certain) fortran. See also F77_FUNC macros (config.h)
# if you need to use fortran names from your C code, or if you
# need to define C code that is to be called from Fortran
# F77_CMAIN_FFLAGS is needed if you link with fortran, but main is in C
# on older MacOS you need to remove any -lcrt1.o and -lcrt2.o (or the like) references
FLIBS = @FLIBS@
FORLIBS = $(FLIBS)
F77_CMAIN_FFLAGS = @F77_CMAIN_FFLAGS@
# YAPPLIB: was removed from NEMORC.{gen,local}
# sometimes (for native cc/f77 compiler on solaris) you need to append $(FLIBS) here
# since FLIBS isn't computed properly
# Note for some PGPLOT devices (e.g. PNDRIV) you will need to add -lpng)
# for PLPLOT a choice between -lplplotd and -lplplotf needs to be consistent with
# the definition triggered for pl_real in yapp_plplot.c !! this is not automated yet
# via configure.
YAPPLIB = $(NEMOLIB)/yapp_@[email protected] @YAPP_LIBS@
## C compiler:
#set opts="-rdynamic -ansi -fwritable-strings -Wconversion -Wnested-externs"
#exec gcc -fPIC -Dlinux -DSYSV -I$NEMOINC -I$NEMOLIB -L$NEMOLIB $opts $* $link
## Fortran compiler
# some older gnu compilers may still need -fno-globals
INC_FLAGS = -I$(NEMOINC) -I$(NEMOLIB) -I$(NEMO)/opt/include @HDF_INC@ @HDF5_INC@ @XINCS@
NEMO_CFLAGS = @NEMO_CFLAGS@ $(MACH) $(NEMO_CFLAGS1) $(INC_FLAGS)
NEMO_FFLAGS = @NEMO_FFLAGS@ $(INC_FLAGS)
NEMO_LDFLAGS =
NEMO_LIBS = -L$(NEMOLIB) -L$(NEMO)/opt/lib -lnemo @LOADOBJ_LIBS@ $(GSL_LIBS) $(RDL_LIBS) $(CFITSIO_LIB) @MATH_LIBS@ @MACOS_LIBS@
NEMO_LIBSPP = -L$(NEMOLIB) -L$(NEMO)/opt/lib -lnemo++ -lnemo @LOADOBJ_LIBS@ $(GSL_LIBS) $(RDL_LIBS) $(CFITSIO_LIB) @MATH_LIBS@ @MACOS_LIBS@
# some graphics libraries:
GLLIBS = @GLLIBS@
XLIBS = @XLIBS@
# generic compile flags for C,Fortran,Linker
# If you must absolutely be pedantic, the following gnu compiler flags are the recommended ones
# (see GSL users guide - appendix A)
# PEDFLAG="-ansi -pedantic -Werror -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wtraditional -Wconversion -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -fshort-enums -fno-common -Dinline= -g -O4"
# optimization only
#PEFFLAG = -Werror-implicit-function-declaration -Wimplicit-int -Wimplicit-function-declaration
#PEDFLAG = --warn-no-implicit-function-declaration
#PEDFLAG = -Wimplicit-int -Wimplicit-function-declaration
#PEDFLAG = -Wno-error # if you want the compiler to shut up and just take a chance in life
PFLAGS = @PFLAGS@ -Wimplicit-function-declaration
COPT = @CFLAGS@
FOPT = @FFLAGS@
LOPT = @LDFLAGS@
# for shared libaries
CCSHARED = @CCSHARED@
# everything
CFLAGS = $(COPT) $(CCSHARED) $(NEMO_CFLAGS) $(PFLAGS) @STDFLAG@
CXXFLAGS = $(COPT) $(CCSHARED) $(NEMO_CFLAGS)
FFLAGS = $(FOPT) $(CCSHARED) $(NEMO_FFLAGS)
LDFLAGS = $(LOPT) $(NEMO_LDFLAGS)
CPPFLAGS = @CPPFLAGS@
RANLIB = @RANLIB@
# -----------------------------------------------------------------------------
# rules
.SUFFIXES: .so .doc
# NEMO compile rules
.o.a:
@echo "***Skipping ar for $* at this stage"
.c.o:
$(CC) $(CFLAGS) $(LOCAL_INC) -c $<
.cc.o:
$(CXX) $(CXXFLAGS) $(LOCAL_INC) -c $<
.c.so:
$(CC) $(CFLAGS) $(LOCAL_INC) -c $<
ldso $*
.cc.so:
$(CXX) $(CXXFLAGS) $(LOCAL_INC) -c $<
ldso $*
.f.so:
$(FC) $(FFLAGS) -c $<
ldso $*
.c.a:
$(CC) $(CFLAGS) $(LOCAL_INC) -c $<
.c:
$(CC) $(CFLAGS) $(LOCAL_INC) -o $* $*.c $(NEMO_LIBS) $(LOCAL_LIB) $(FORLIBS) $(EL)
.cc:
$(CXX) $(CXXFLAGS) $(LOCAL_INC) -o $* $*.c $(NEMO_LIBSPP) $(LOCAL_LIB) $(FORLIBS) $(EL)
.o:
$(CC) $(CFLAGS) $(LOCAL_INC) -o $* $*.o $(NEMO_LIBS) $(LOCAL_LIB) $(FORLIBS) $(EL)
# -----------------------------------------------------------------------------
# some fortran code needs a REAL FUNCTIONS SECOND (e.g. scfm)
# this macro should point to the .o file (if needed)
# Sometimes it is FORLIBS, sometimes your etime.o or second.o
# On Solaris you need second.o; Linux can keep it blank (it's in libg2c)
# SECOND = $(NEMOLIB)/second.o
# xxxTYPE's: falcON now uses PLATFORM := $(shell uname -m)
PLATFORM := $(shell uname -m)
makedefs_help:
@echo ========================================================================
@echo NEMOVER=$(NEMOVER)
@echo CC=$(CC)
@echo CFLAGS=$(CFLAGS)
@echo CPP=$(CPP)
@echo CPPFLAGS=$(CPPFLAGS)
@echo CXX=$(CXX)
@echo CXXFLAGS=$(CXXFLAGS)
@echo F77=$(F77)
@echo FFLAGS=$(FFLAGS)
@echo DEFS=$(DEFS)
@echo CFLAGS=$(CFLAGS)
@echo FFLAGS=$(FFLAGS)
@echo LDFLAGS=$(LDFLAGS)
@echo FC=$(F77)
@echo LN_S=$(LN_S)
@echo GLLIBS=$(GLLIBS)
@echo XLIBS=$(XLIBS)
@echo LIBS=@LIBS@
@echo RANLIB=$(RANLIB)
@echo YAPPLIB=$(YAPPLIB)
@echo PLATFORM=$(PLATFORM)
@echo HOSTTYPE=$(HOSTTYPE)
@echo MACHTYPE=$(MACHTYPE)
@echo OSTYPE=$(OSTYPE)
@echo ========================================================================
# this peculiar include will include a file LocalMakedefs in the local/current
# directory only if it is present, but not complain if not present. This is
# the recommended way to tailor a particular directory, e.g. for debugging
# you could add something like
# NEMO_CFLAGS += -Wall -W -g
#
-include LocalMakedefs