1################################################################## 2# 3# This Makefile is tested with FreeBSD 5.x 4# 5# Contributed by: 6# Jason W. Bacon 7# Medical College of Wisconsin 8# bacon@smithers.neuro.mcw.edu 9# 10# Before compiling afni, install the following packages: 11# 12# open-motif 13# 14# To compile SUMA you will also need the following packages: 15# 16# libiconv 17# gettext 18# gmake 19# 20# Note: SUMA has display problems on FreeBSD 4.8 and below that I 21# have not found time to resolve. I believe they are related 22# to the version of the GL libraries that ship with 4.x. 23# 24# SUMA works fine under FreeBSD 4.9 with GeForce drivers installed 25# and under FreeBSD 5.1. 26# 27# Note: The SUMA build process (as of Aug, 2003) requires GNU make, 28# which is ${LOCALBASE}/bin/gmake on BSD systems. 29# Be sure the MAKE macro below is set to gmake. 30# 31# Note: Compilation of netcdf-3.5.0 may fail due to m4's lack of 32# support for the -B option. Remove the -B10000 flag from 33# netcdf-3.5.0/src/configure BEFORE running make to avoid 34# this error. ( Or force configure to use gm4 by reversing 35# the order of "m4 gm4" to "gm4 m4" everywhere in the script } 36# This problem has been reported to the netcdf development team. 37# It seems to have been resolved as of the June, 2003 afni 38# source distribution. 39# 40 41USE_ZLIB = -DHAVE_ZLIB 42LZLIB = -lz 43USE_GIFTI = -DHAVE_GIFTI 44LGIFTI = -L${LOCALBASE}/lib -lexpat 45 46CC? = cc 47LD? = ${CC} 48 49CCDEBS = -DAFNI_DEBUG -DIMSEQ_DEBUG -DDISPLAY_DEBUG -DTHD_DEBUG 50CEXTRA = -DFreeBSD -DNO_GAMMA -DUSE_TRACING -DHAVE_XDBE -DSUMA_MOTIF_GLXAREA 51CEXTRA += -DPIC -fPIC 52ifeq (${ARCH}, ia64) 53CEXTRA += -DPIC -fPIC 54endif 55 56CFLAGS += -Wno-return-type -Wno-switch ${CEXTRA} 57CC += ${CFLAGS} 58 59CCVOL = ${CC} 60CCFAST = ${CC} -O3 61CCMIN = ${CC} 62CCD = ${CC} ${CCDEBS} 63CCSVD = ${CC} -O0 64CCOLD = ${CC} 65 66IFLAGS = -I. -I${LOCALBASE}/include 67LFLAGS = -s -L. -L${LOCALBASE}/lib 68 69MAKE = gmake 70# Some build scripts pick up the wrong make, so Makefile.INCLUDE is edited 71# to use MAKE_CMD 72MAKE_CMD = gmake 73 74PLUGIN_SUFFIX = so 75PLUGIN_LFLAGS = -shared 76PLUGIN_CC = ${CC} 77PLFLAGS = -s -rdynamic -L. -L${LOCALBASE}/lib 78 79AR = /usr/bin/ar 80RANLIB = /usr/bin/ranlib 81TAR = /usr/bin/tar 82MKDIR = /bin/mkdir 83TAPE = /dev/sa0 84GZIP = /bin/gzip 85 86RM = /bin/rm -f 87MV = /bin/mv -f 88CP = /bin/cp -f 89 90LINT = /usr/bin/lint -a -b -u -v -x ${IFLAGS} ${CCDEFS} 91 92INSTALLDIR = ./BSD 93LIBDIR = ${INSTALLDIR} 94 95# for dynamic linking 96 97LLIBS = -lmri -lf2c -lXm -lXpm -lXext -lXmu -lXt -lX11 -lm $(LZLIB) $(LGIFTI) 98 99# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 100# For suma (NO STATIC LINKING OF GL libs) 101# Use -IGLw_local and -lGLws to avert the following suma runtime error due 102# to lack of extern modifier in GLwDrawA.h: 103# ** ERROR: glwMDrawingAreaWidgetClass is NULL 104# This may break if bundled GLw is not kept up-to-date, 105SUMA_INCLUDE_PATH = -IGLw_local -I${LOCALBASE}/include/glib-2.0 -I${LOCALBASE}/lib/glib-2.0/include -I${LOCALBASE}/include -I./ -I../ -I../niml/ -Igts/src 106SUMA_LINK_PATH = -L/usr/lib -L${LOCALBASE}/lib -L../ 107#use -lGLw if you have libGLw.a or libGLw.so* or 108# -lMesaGLw if you have Mesa's version (libMesaGLw*) of libGLw 109SUMA_LINK_LIB = -lXm -lGLws -lGLU -lGL -lXmu -lXt -lXext -lX11 -lm $(LZLIB) -lxml2 -lexpat 110SUMA_MAKEFILE_NAME = SUMA_Makefile 111SUMA_BIN_ARCHIVE = SUMA_FreeBSD.tar 112SUMA_GLIB_VER = -2.0 113# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 114 115############################################################### 116 117include Makefile.INCLUDE 118