# ********** CONFIGURATION INFO ****************

# MAKE SURE YOU HAVE NO SPACES AFTER THE PATH NAMES OR OS's


# For this makefile to work properly, OS must be set to Linux or HP-UX.
# I recommend to set this in your .cshrc or equivalent,
# e.g. as setenv OS "`uname`"
# If it's not set there, then uncomment the appropriate line below.
#OS = HP-UX
#OS = SOL
OS = Linux


# Specify directory containing libagt.a , i.e. AGTREE directory
AGTREEDIR = ../..

# Specify which compiler to use and which flags
CC_HP-UX = cc
CC_Linux = i486-linuxlibc5-gcc
CC_SOL    = cc


CFLAGS_Linux = -V 2.7.2.3 -O -Wall -ansi -Werror -pedantic
CFLAGS_HP-UX = -O -Aa -Wall
CFLAGS_SOL   = -O -Xa


######### END CONFIGURABLE OPTIONS #########
CC      = $(CC_$(OS))

LIBS  =  $(AGTREEDIR)/libagt.a -lm
CFLAGS  = $(CFLAGS_$(OS))

BINDIR = ..

all: make_agtree predict

clean:
	/bin/rm -f *.o $(BINDIR)/make_agtree $(BINDIR)/predict

make_agtree: make_agtree.c $(AGTREEDIR)/libagt.a  
	$(CC) $(CFLAGS) -o $(BINDIR)/make_agtree make_agtree.c $(LIBS)  

predict: predict.c $(AGTREEDIR)/libagt.a  
	$(CC) $(CFLAGS) -o $(BINDIR)/predict predict.c $(LIBS)  

.c.o:
	$(CC) $(CFLAGS) -c $*.c -o $*.o


