CC=gcc

ATLAS_DIR=/h/d5/c/d99rj/ATLAS
ATLAS_ARCH=Linux_P4SSE2_2

# fast
C_COMPILE_OPTS=-O3 -Wall -pedantic -I$(ATLAS_DIR)/include
C_LINK_OPTS=-L$(ATLAS_DIR)/lib/$(ATLAS_ARCH) -llapack -lcblas -latlas -lm

# gprof
#C_COMPILE_OPTS=-xCC -xpg -I/local/ATLAS/include
#C_LINK_OPTS=-xpg -L/local/ATLAS/lib/SunOS_SunUS5 -llapack -lcblas -latlas -lm

# tcov
#C_COMPILE_OPTS=-xCC -xprofile=tcov -I/local/ATLAS/include
#C_LINK_OPTS=-xprofile=tcov -L/local/ATLAS/lib/SunOS_SunUS5 -llapack -lcblas -latlas -lm

# debug
#C_COMPILE_OPTS=-xCC -g -I/local/ATLAS/include
#C_LINK_OPTS=-g -L/local/ATLAS/lib/SunOS_SunUS5 -llapack -lcblas -latlas -lm
#C_COMPILE_OPTS=-g -I/h/d5/c/d99rj/ATLAS/include
#C_LINK_OPTS=-L/h/d5/c/d99rj/ATLAS/lib/Linux_P4SSE2_2 -llapack -lcblas -latlas -lm

rvm-train: rvm-train.o
	$(CC) -o rvm-train rvm-train.o $(C_LINK_OPTS) 

%.o: %.c
	$(CC) $(C_COMPILE_OPTS) -c $<

clean:
	rm -f rvm-train *.o *~ gmon.out *.d *.tcov profile

#packages: rvm-train
#        rm -f $(INSTALLDIR)/morf*tar.gz; cd ..; \
#        tar cf morf.tar morf/morf.c morf/Makefile morf/paradigms.txt \
#         morf/tags.txt morf/COPYING; \
#        gzip morf.tar; \
#        strip morf/morf; \
#        tar cf morf_solaris.tar morf/morf morf/paradigms.txt morf/tags.txt \
#         morf/COPYING; \
#        gzip morf_solaris.tar; \
#        chmod 644 morf*tar.gz; mv morf*tar.gz $(INSTALLDIR)
