# 
# ------ MAKEFILE FILE FOR Linux FREALIGN -----------xlf
# 
# Using: gnu compiler
#
# Thanks to: Shixin Yang & Dr Edward Egelman at University of Virginia
#    for providing this file
#
# Notes:  To create executable: make -f Makefile_G5_OSX_xlf
#

SHELL  = /bin/sh

FFLAGS = -O5 -qprefetch -qfloat=fltint:maf:rsqrt -qunroll=yes -w -qextname -qarch=ppcv

CFLAGS = -O5 -qprefetch -qfloat=fltint:maf:rsqrt -qunroll=yes -w -qextname -qarch=ppcv

COMP   = xlf -qfixed=120

CC     = xlc -qfixed=120

LF     = -O5 -qprefetch -qfloat=fltint:maf:rsqrt -qunroll=yes -w -qextname -qarch=ppcv \
	 -Wl,-framework -Wl,vecLib -lcc_dynamic

PGM    = frealign_v9

LIB    = $(PGM).a

.PRECIOUS :  $(PGM) $(LIB) 

include Makefile.inc

ioc.o : ioc.c
	$(CC) $(CFLAGS) -o ioc.o ioc.c
	$(AR) r $(LIB) ioc.o
	@\rm ioc.o

$(LIB) : ioc.o $(ELEMENTS)
	@echo all object files placed in library

.f.a:
	$(COMP) $(FFLAGS) $<
	$(AR) r $(LIB) $*.o
	@\rm $*.o
