freebsd-ports/science/gamess/files/patch-compddi
2007-08-02 03:46:54 +00:00

92 lines
2.5 KiB
Text

--- ddi/compddi.orig Wed Jul 11 05:01:19 2007
+++ ddi/compddi Thu Aug 2 11:13:19 2007
@@ -13,9 +13,9 @@
# axp64,compaq-sc,cray-pvp,cray-t3e,cray-x1,cray-xd1,cray-xt3,
# fuji-pp32,fuji-pp64,hpux32,hpux64,ibm32,ibm64,ibm64-sp,ibm-bg,
# linux32,linux64,linux-ia64,mac32,macG5,necsx,
-# sgi32,sgi64,sun32,sun64
+# sgi32,sgi64,sun32,sun64,freebsd-i386,freebsd-amd64
#
- set TARGET = ibm64
+ set TARGET = %%ARCH%%
# 2. Choose DDI communication layer, the only legal values are
# sockets,mixed,mpi,shmem,lapi,armci
@@ -638,7 +638,77 @@
set RANLIB_FLAGS = ' '
endif
+# --------------------------------------- #
+# FreeBSD for x86 PCs #
+# --------------------------------------- #
+ if($TARGET == freebsd-i386) then
+
+ set FORTRAN=%%FORTRAN%% # choose from g77, gfortran, ifort, pgf77, f2c
+
+ set CC = %%CC%%
+ set CFLAGS = "-DLINUX -O3 -fstrict-aliasing -I./include"
+
+ switch ($FORTRAN)
+ case g77:
+ case pgf77:
+ case f2c:
+ set NumUS=2
+ breaksw
+ case gfortran:
+ set CFLAGS = "$CFLAGS -Dgetarg_=_gfortran_getarg_i4"
+ set CFLAGS = "$CFLAGS -Diargc_=_gfortran_iargc"
+ set NumUS=1
+ breaksw
+ case ifort:
+ set NumUS=1
+ breaksw
+ default:
+ echo Please spell your ia32 compiler correctly.
+ exit 4
+ endsw
+
+ set CLIBS = "%%PTHREAD_LIBS%%"
+ set F77_OPTS = "-DINT_SIZE=int -D_UNDERSCORES=$NumUS"
+ set AR_FLAGS = 'cr'
+ set RANLIB_FLAGS = ' '
+
+ endif
+
+# ------------- #
+# FreeBSD amd64 #
+# ------------- #
+ if($TARGET == freebsd-amd64) then
+
+ set CC = %%CC%%
+ set CFLAGS = "-DLINUX -m64 -O3 -fstrict-aliasing -I./include"
+
+ set FORTRAN=%%FORTRAN%%
+ switch ($FORTRAN)
+ case g77:
+ case pgf77:
+ case f2c:
+ set NumUS=2
+ breaksw
+ case gfortran:
+ set CFLAGS = "$CFLAGS -Dgetarg_=_gfortran_getarg_i4"
+ set CFLAGS = "$CFLAGS -Diargc_=_gfortran_iargc"
+ set NumUS=1
+ breaksw
+ case ifort:
+ set NumUS=1
+ breaksw
+ default:
+ echo Please spell your x86_64 compiler correctly.
+ exit 4
+ endsw
+
+ set CLIBS = "%%PTHREAD_LIB%%"
+ set F77_OPTS = "-DINT_SIZE=int -D_UNDERSCORES=$NumUS"
+ set AR_FLAGS = 'cr'
+ set RANLIB_FLAGS = ' '
+
+ endif
# ------------------------- #
# Mac OS X (10.2 or 10.3) #