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
|
#
# platform_specific.mk.debian
#
# This file is included in other Makefiles and defines
# platform specific macros
PLATFORM = $(shell uname -s -r)
GUI_INCLUDES =
GKS_INCLUDES =-I/usr/include/xgks
INCLUDES = \
-I../../fmt/cmn \
-I../../fer/common \
-I/$(NETCDF4_DIR)/include \
-I/usr/include \
-I/usr/include/X11 \
-I../../ppl/include\
-I../../ppl/tmap_inc \
-I/usr/include/xgks
FINCLUDES = -I../../ppl/tmap_inc \
-I../../fmt/cmn \
-I../../ppl/include \
-I../../fer/common \
-I../../external_functions/ef_utility
CC = gcc
CXX = c++
FC = gfortran
F77 = gfortran
RANLIB = /usr/bin/ranlib
CPP = /lib/cpp
LD = gcc
LDFLAGS = -v --verbose -fpic -export-dynamic
LD_DYN_FLAGS = -v -fpic -shared
CPP_FLAGS = $(INCLUDES) \
-Dunix -Dgfortran \
-DNO_OPEN_SHARED \
-DNO_OPEN_RECORDTYPE \
-DX_REFRESH -Dreclen_in_bytes \
-DNO_OPEN_READONLY -DMANDATORY_FORMAT_WIDTHS\
-DNO_OPEN_CARRIAGECONTROL -Dxgks -DSTAR_1_SUPPORTED \
-DFULL_GUI_VERSION -DX_REFRESH \
-DXT_CODE -DLINUX -DNO_PASSED_CONCAT \
-Dcrptd_cat_argument \
-DG77_SIGNAL -DG77 \
-DNEED_IAND -DINTERNAL_READ_FORMAT_BUG \
-DNO_PREPEND_STRING -DNO_DOUBLE_ESCAPE_SLASH \
-Ddouble_p
# Flags for compiling all C code
# -DusingDODSf2cUnderscore needed if using netcdf library...
# also consider -ffloat-store.
CFLAGS = $(CPP_FLAGS) -fPIC \
-Dlint -D_SSIZE_T -DVOID_SIGHANDLER -D_POSIX_VERSION -DLINUX \
-DFULL_GUI_VERSION -DX_REFRESH -DXT_CODE -Dsun4
# Flags for compiling the PlotPlus FORTRAN code (ppl subdirectory)
PPLUS_FFLAGS = $(CPP_FLAGS) \
-fno-automatic -fno-second-underscore \
-fdollar-ok -ffixed-line-length-132 -fallow-argument-mismatch $(FINCLUDES)
# Flags for compiling non-PlotPlus FORTRAN code
FFLAGS = $(CPP_FLAGS) -fPIC \
-fno-automatic -fno-second-underscore \
-fdollar-ok -ffixed-line-length-132 -ffpe-trap=overflow -fallow-argument-mismatch \
-fdefault-real-8 -fdefault-double-8 $(FINCLUDES)
# Add hardening
CFLAGS += `dpkg-buildflags --get CFLAGS`
CPPFLAGS += `dpkg-buildflags --get CPPFLAGS`
FFLAGS += `dpkg-buildflags --get FFLAGS`
# PROF_FLAGS = -pg
GKSLIB = -lxgks-gfortran
SYSLIB = -lX11 -lm -ldl
CDFLIB = -lnetcdff -lnetcdf -lgfortran
TERMCAPLIB =
READLINELIB = -lreadline
LINUX_OBJS = special/linux_routines.o \
dat/*.o \
../fmt/src/x*.o \
../ppl/plot/ppldata.o
## cancel the default rule for .f -> .o to prevent objects from being built
## from .f files that are out-of-date with respect to their corresponding .F file
#%.o : %.f
#
## use cpp to preprocess the .F files to .f files and then compile the .f files
#%.o : %.F
# rm -f $*.f
# $(CPP) -P -traditional $(CPP_FLAGS) $(<F) | sed -e 's/de /de /g' | sed -e 's/de /de /g' > $*.f
# $(F77) $(FFLAGS) -c $*.f
# Directly compile the .F source files to the .o object files
# since gfortran can handle the C compiler directives in Fortran code
%.o : %.F
$(FC) $(FFLAGS) -c $*.F -o $*.o
#
# End of platform_specific_includes.mk.debian
#
|