# Makefile for MRI tools
# Copyright (c) 1998 Matthew Belmonte
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# If you find this program useful, please send mail to Matthew Belmonte.
# <mkb4@Cornell.edu>.  If you base a publication on data processed by this
# program, please notify Matthew Belmonte and acknowledge him in your
# publication.

INSTALLDIR = /usr/local/bin
INCLUDES = 
CC = /usr/bin/cc
CC_OPTS = -O2
SCRIPT = 3Dreconstruct
EXE = area fromge gecon interpolate boundary_blend boundary_interpolate clump colourise segment unwarp

all: $(EXE) $(SCRIPT)

area: area.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o area area.c -lforms -lX11 -limage -lm

fromge: fromge.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o fromge fromge.c -limage

gecon: gecon.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o gecon gecon.c -lforms -lX11 -lm

interpolate: interpolate.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o interpolate interpolate.c

boundary_blend: boundary_blend.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o boundary_blend boundary_blend.c -limage -lm

boundary_interpolate: boundary_interpolate.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o boundary_interpolate boundary_interpolate.c

clump: clump.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o clump clump.c -limage

colourise: colourise.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o colourise colourise.c -limage

segment: segment.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o segment segment.c

unwarp: unwarp.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o unwarp unwarp.c -limage

epicat: epicat.c
	$(CC) $(CC_OPTS) $(INCLUDES) -o epicat epicat.c

install:
	cp -f $(SCRIPT) $(INSTALLDIR)
	mv -f $(EXE) $(INSTALLDIR)
