# # arch_spec_f77.mk # # Architecture/site specific makefile fragment # for inclusion by packages that use f77 code with g++. # # include this to get LOADLIBES extended # # Bob Jacobsen, Oct 95 # # uses four internal variables that can be overridden from environment: # # FORTLINKDIR = base directory for f77 compiler/linker specific stuff # FORTLINKVER = version number for Sun # FORTLINKLIBS = -L for the the needed extra libs # FORTLINKOBJS = .o filenames or other things for the link line # ifneq (,$(findstring SunOS5,$(BFARCH))) # Also known as Solaris # This is thought to be general FORTLINKDIR = /usr/lang FORTLINKVER = SC3.0 FORTLINKLIBS = -L$(FORTLINKDIR)/$(FORTLINKVER)/lib FORTLINKOBJS = override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -lM77 -lF77 -lsunmath -lm # # for the record, LBNL requires: # FORTLINKDIR = /vol/lic/SUNWspro-3.0 # else ifneq (,$(findstring SunOS4,$(BFARCH))) # The following are now for the "new 2.0.1 compiler", needed by the # 95a CERNLIB distribution (rgj 12/21/95) FORTLINKDIR = /usr/lang FORTLINKVER = SC3.0.1 FORTLINKLIBS = -L$(FORTLINKDIR)/$(FORTLINKVER)/lib FORTLINKOBJS = $(FORTLINKDIR)/$(FORTLINKVER)/lib/values-Xa.o override LDFLAGS += $(FORTLINKLIBS) override LOADLIBES += $(FORTLINKOBJS) -u _fix_libc_ -lM77 -lF77 -lsunmath -lm -lansi -lcx -lc # # for the record, LBNL requires: # FORTLINKDIR = /vol/pub/SUNWspro # FORTLINKVER = SC2.0.1 # FORTLINKLIBS = -L$(FORTLINKDIR)/lib # FORTLINKOBJS = $(FORTLINKDIR)/$(FORTLINKVER)/values-Xa.o # else ifneq (,$(findstring AIX,$(BFARCH))) override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -lxlf -lxlf90 ## # standard form for version 3.2 of xlf, at least at SLAC ## slac hacks ## # f90 lib required for use of vms2f90 or xlf preproc; .exp file for mulh, divss ## FORTLINKDIR = /usr/local/aixfort/xlf32/usr/lpp/xlf ## FORTLINKVER = ## FORTLINKLIBS = ## FORTLINKOBJS = $(FORTLINKDIR)/lib/lowsys.exp ## # modifiy the library search path to get the latest versions of xlf libraries ## # (otherwise there will be problems linking against CERNLIBs which are ## # currently compiled using xlf 2.3. Example: FFREAD i/o wont work properly) ## # W. Lockman, 22 Mar 96 ## override LDFLAGS += -L/usr/local/aixfort/xlf32/usr/lib # uncomment the next line to always generate a loadmap; -Xlinker is needed # to pass through g++ as linker # override LDFLAGS += -Xlinker -bmap:$(workdir)$(@F).map else ifneq (,$(findstring HP-UX,$(BFARCH))) # LLNL is first site, but this is thought to be standard FORTLINKDIR = FORTLINKVER = FORTLINKLIBS = FORTLINKOBJS = override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -L/opt/fortran/lib/ \ -lcl -lisamstub -lU77 /usr/lib/libdld.sl # remove the -Xlinker in the following line if g++ is not used for link override LDFLAGS += -Xlinker -a -Xlinker archive else ifneq (,$(findstring OSF,$(BFARCH))) # UCSB is first site, but this is "standard" FORTLINKDIR = FORTLINKVER = FORTLINKLIBS = FORTLINKOBJS = override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -lshpf -lUfor -lfor -lFutil -lots -lc -lm else ifneq (,$(findstring IRIX5,$(BFARCH))) # Notre Dame is first site, but this is "standard" FORTLINKDIR = FORTLINKVER = FORTLINKLIBS = FORTLINKOBJS = override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -liberty -lftn -lm else ifneq (,$(findstring IRIX6,$(BFARCH))) # Notre Dame is first site, but this is "standard" FORTLINKDIR = FORTLINKVER = FORTLINKLIBS = FORTLINKOBJS = # Search for CC (not -CC), to match either CC or KCC ifeq (CC,$(findstring CC,$(BFARCH))) override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -lftn -lm else override LDFLAGS += -L $(GCC_DIR)/lib override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -liberty -lftn -lm endif else ifneq (,$(findstring Linux2-EGCS,$(BFARCH))) FORTLINKDIR = FORTLINKVER = FORTLINKLIBS = FORTLINKOBJS = override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -lg2c -lm else ifneq (,$(findstring Linux,$(BFARCH))) FORTLINKDIR = FORTLINKVER = FORTLINKLIBS = FORTLINKOBJS = override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) -lf2c -lm else ifneq (,$(findstring MSVC,$(BFARCH))) FORTLINKDIR = FORTLINKVER = FORTLINKLIBS = FORTLINKOBJS = override LOADLIBES += $(FORTLINKLIBS) $(FORTLINKOBJS) dformt.lib dfqwin.lib dfqw_sdi.lib override LDFLAGS += -NTLinclude:__matherr else # Nothing found - complain ERROR := $(shell echo Could not match BFARCH: $(BFARCH) for f77 libs >& 2 ) endif endif endif endif endif endif endif endif endif endif