#
# Makefile
#
# This file is part of Automaton.
#
# Copyright (C) 2002, 2003
# Paul Gettings, Dep't of Geology & Geophysics
# University of Utah
#
# This file is released under the terms of the software
# license in the file "LICENSE" in the root directory of
# this package.  If this file is missing or corrupt, please
# contact the author to receive a new copy.
#
# Automaton 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.  Use at your
# own risk; your mileage may vary.
#
# Suggestions, improvements, and bug reports welcome at
# <gettings@mines.utah.edu>
#

# Simple Makefile

# Set to your local C++ compiler
CC = g++ 

# For AMD Athlon CPUs
CC_OPTS = -O3 -march=pentiumpro -mcpu=k6 -g
# For Pentium II/III CPUs
#CC_OPTS = -O3 -march=pentiumpro
# Uncomment this line for profiling information
#CC_OPTS = -pg
# Uncomment this line for debugging information
#CC_OPTS = -g

OBJS = autopick.o getrecord.o segy.o

all: autopick arsegy positionSEGY printSEGYposition

autopick: main.cpp $(OBJS)
	$(CC) $(CC_OPTS) -o $@ $^ -lm

positionSEGY: positionSEGY.cpp $(OBJS)
	$(CC) $(CC_OPTS) -o $@ $^ -lm

printSEGYposition: printSEGYposition.cpp $(OBJS)
	$(CC) $(CC_OPTS) -o $@ $^ -lm

arsegy: arsegy.cpp $(OBJS)
	$(CC) $(CC_OPTS) -o $@ $^ -lm

clean:
	rm -f autopick positionSEGY printSEGYposition arsegy *.o

segy.o: segy.cpp segy.h
	$(CC) $(CC_OPTS) -c -o $@ segy.cpp

autopick.o: autopick.cpp autopick.h
	$(CC) $(CC_OPTS) -c -o $@ autopick.cpp

getrecord.o: getrecord.c getrecord.h
	$(CC) $(CC_OPTS) -c -o $@ getrecord.c
