# ********** 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 location of Matlab 5 installation directory (need absolute path here)


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

# Use this if you want to store the tomograhic
# projection matrix, if you want to compute
# it on the fly, cut '-DSTORE_A_MATRIX'

CC      = $(CC_$(OS)) -DSTORE_A_MATRIX


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


######### END CONFIGURABLE OPTIONS #########


LIBS    = -lm
CFLAGS  = $(CFLAGS_$(OS))


LP = ../ansi_lib_loc

LIB_OBJS = $(LP)/allocate.o $(LP)/assort.o $(LP)/randlib.o  \
           $(LP)/A_comp.o $(LP)/solve2.o fr_icm.o \
           fr_paramest.o fr_recon.o


all: trans

clean:
	/bin/rm -f *.o ../trans trans $(LIB_OBJS)

trans: trans.c fr_icm.h  fr_paramest.h fr_recon.h $(LIB_OBJS) 
	$(CC) $(CFLAGS) -o trans trans.c  $(LIB_OBJS) $(LIBS) 
	mv trans ../


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


