## Libtool version LT_F_VERS_INTERFACE=@LT_F_VERS_INTERFACE@ LT_F_VERS_REVISION=@LT_F_VERS_REVISION@ LT_F_VERS_AGE=@LT_F_VERS_AGE@ AM_FCFLAGS=@AM_FCFLAGS@ AM_LDFLAGS=@AM_LDFLAGS@ ACLOCAL_AMFLAGS="-I m4" ## src/f90/Makefile.am # This is our main target, the fortran library lib_LTLIBRARIES=libinterpos.la # Add libtool numbers to Fortran library # Add libtool's rpath option libinterpos_la_LDFLAGS= -version-info $(LT_F_VERS_INTERFACE):$(LT_F_VERS_REVISION):$(LT_F_VERS_AGE) -rpath '$(DESTDIR)$(libdir)' $(AM_LDFLAGS) # Source files for the library. libinterpos_la_SOURCES=$(MODS_for_interpos_source) libinterpos_la_SOURCES+=$(SRCS) if HAVE_openblas # Library may depend on openblas via pkg-config AM_FCFLAGS+=$(openblas_CFLAGS) libinterpos_la_LIBADD=$(openblas_LIBS) $(LIBS) $(FCLIBS) else if HAVE_BLAS # or some other lapack/blas lib. libinterpos_la_LIBADD=$(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) $(FCLIBS) else # Library will use own lapack libinterpos_la_SOURCES+=dpgbtrf_s.f90 endif endif # Sources and modules to install SRCS_c_wrapper = interpos_wrapper_c.c SRCS_f90_wrapper = c_wrapper_to_interpos.f90 MODS_for_interpos_source = \ prec_rkind.f90 \ checknanos_module.f90 \ interpos_module.f90 SRCS = \ cbsplgen.f90 \ cbsplgenp.f90 \ cbfitbnd.f90 \ cbfitper.f90 \ splipera.f90 \ splibnda.f90 \ intlinear.f90 \ intquadratic.f90 FORTMODULES = \ prec_rkind.$(FC_MODEXT) \ checknanos_module.$(FC_MODEXT) \ interpos_module.$(FC_MODEXT) # Install pkg-config files pkgconfig_DATA = interpos.pc ## Install fortran module files f90moddir = @FORTRANMODDIR@ nodist_f90mod_HEADERS = $(FORTMODULES) ## Install interpos_source.f90 file nodist_include_HEADERS = interpos_source.f90 BUILT_SOURCES = interpos_source.f90 interpos_source.f90: ( cd $(srcdir) && cat $(MODS_for_interpos_source) $(SRCS) ) > $@ ## Install c wrapper for IDL and TDI if ENABLE_CWRAPPER # Also build C Wrapper for IDL and friends lib_LTLIBRARIES+=libinterpos_cwrapper.la libinterpos_cwrapper_la_LDFLAGS= -version-info $(LT_F_VERS_INTERFACE):$(LT_F_VERS_REVISION):$(LT_F_VERS_AGE) -rpath '$(DESTDIR)$(libdir)' $(AM_LDFLAGS) libinterpos_cwrapper_la_SOURCES=$(MODS_for_interpos_source) libinterpos_cwrapper_la_SOURCES+=$(SRCS) # Library will use own lapack libinterpos_cwrapper_la_SOURCES+=dpgbtrf_s.f90 # Wrapper sources f90 and c libinterpos_cwrapper_la_SOURCES+=$(SRCS_f90_wrapper) $(SRCS_c_wrapper) endif ## Clean up modules too. MOSTLYCLEANFILES = *.$(FC_MODEXT) interpos_source.f90 ## AM_FCCPPFLAGS, FCCPPFLAGS are currently not used. PPFCCOMPILE = $(FC) $(FCDEFS) $(DEFAULT_INCLUDES) $(FCINCLUDES) $(AM_FCCPPFLAGS) $(FCCPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(PPFCCOMPILE) # Treat all .f90 files as preprocessed Fortran. .f90.o: $(PPFCCOMPILE) -c -o $@ $< # Dependency tree (allows make -j) %.mod : %.lo ; # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). prec_rkind.lo: prec_rkind.f90 ## Dependencies below manually generated by: ## sed -i '/MAGIC31415$/q' Makefile.am # Remove anything below the next line. ## grep -iHE '^ *use' *f90 | sed '/! IGNORE/d;s/\.f90.*use//g;s/\.f90.*USE//g;s/,.*$//g' | { P=/ ; while read C D ;do test x$P = x$C && printf " $D.lo" || printf "\n$C.lo: $C.f90 $D.lo"; P=$C ;done; echo ;} >> Makefile.am # MAGIC31415 cbfitbnd.lo: cbfitbnd.f90 prec_rkind.lo cbfitper.lo: cbfitper.f90 prec_rkind.lo cbsplgen0mod.lo: cbsplgen0mod.f90 prec_rkind.lo cbsplgen0.lo: cbsplgen0.f90 prec_rkind.lo cbsplgenp0mod.lo: cbsplgenp0mod.f90 prec_rkind.lo cbsplgenp0.lo: cbsplgenp0.f90 prec_rkind.lo cbsplgenp.lo: cbsplgenp.f90 prec_rkind.lo cbsplgen.lo: cbsplgen.f90 prec_rkind.lo checknanos_module.lo: checknanos_module.f90 prec_rkind.lo c_wrapper_to_interpos.lo: c_wrapper_to_interpos.f90 interpos_module.lo prec_rkind.lo dpgbtrf_s.lo: dpgbtrf_s.f90 prec_rkind.lo findindicesper.lo: findindicesper.f90 prec_rkind.lo findindices.lo: findindices.f90 prec_rkind.lo interpos_matlab_top32bits.lo: interpos_matlab_top32bits.f90 interpos_module.lo prec_rkind.lo interpos_matlab_top.lo: interpos_matlab_top.f90 checknanos_module.lo interpos_module.lo prec_rkind.lo interpos_module.lo: interpos_module.f90 checknanos_module.lo prec_rkind.lo interpos_source.lo: interpos_source.f90 checknanos_module.lo prec_rkind.lo intlinear.lo: intlinear.f90 prec_rkind.lo intquadratic.lo: intquadratic.f90 prec_rkind.lo quicksort.lo: quicksort.f90 qsort_c_module.lo splibnda.lo: splibnda.f90 prec_rkind.lo splibnd.lo: splibnd.f90 prec_rkind.lo splipera.lo: splipera.f90 prec_rkind.lo