--- compall.orig	2012-09-07 22:32:57.000000000 +0900
+++ compall	2013-02-27 15:59:37.000000000 +0900
@@ -58,6 +58,8 @@
 if (($TARGET == ibm-bg) && ($GMS_BG_MODEL == P))  set CCOMP='bgxlc_r'
 if  ($TARGET == linux32)                          set CCOMP='gcc'
 if  ($TARGET == linux64)                          set CCOMP='gcc'
+if  ($TARGET == freebsd32)                          set CCOMP='%%CC%%'
+if  ($TARGET == freebsd64)                          set CCOMP='%%CC%%'
 if  ($TARGET == necsx)                            set CCOMP='c++'
 #
 unset extraflags
@@ -96,6 +98,8 @@
    if ($chip == x86_64) set extraflags='-DLINUX64 -m64'
    if ($chip == ia64)   set extraflags='-DLINUX64'  # this always 64 bits
 endif
+if ($TARGET == freebsd32) set extraflags='-DLINUX32'
+if ($TARGET == freebsd64) set extraflags='-DLINUX64 -m64'
 if ($TARGET == mac32)        set extraflags='-DLINUX32'
 if ($TARGET == mac64)    set extraflags='-DLINUX64 -m64 -I/usr/include/malloc'
 if ($TARGET == necsx)        set extraflags='-DNECSX -size_t64'
@@ -211,6 +215,8 @@
 if ($TARGET == ibm-bg)     ./comp blas
 if ($TARGET == linux32)    ./comp blas
 if ($TARGET == linux64)    ./comp blas
+if ($TARGET == freebsd32)  ./comp blas
+if ($TARGET == freebsd64)  ./comp blas
 if ($TARGET == mac64)      ./comp blas
 if ($TARGET == sun32)      ./comp blas
 if ($TARGET == sun64)      ./comp blas
@@ -547,6 +553,8 @@
                          set VB2000=false
 if ($TARGET == linux64)  set VB2000=true
 if ($TARGET == linux32)  set VB2000=true
+if ($TARGET == freebsd64) set VB2000=true
+if ($TARGET == freebsd32) set VB2000=true
 if ($TARGET == mac64)    set VB2000=true
 if ($VB2000 == true) then
    ./comp vb2000
