# 
# ------ MAKEFILE FILE FOR Linux FREALIGN -----------
# 
# 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_linux
#

SHELL  = /bin/sh

FFLAGS = -O3 -s -fomit-frame-pointer -Wall -falign-functions=4 \
	 -funroll-loops -fexpensive-optimizations -fschedule-insns2 \
	 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
	 -cpp -w -c

CFLAGS = -O3 -DPROTOTYPE -D_FILE_OFFSET_BITS=64 \
	 -D_LARGEFILE_SOURCE -cpp -w -c

COMP   = gfortran

CC     = gcc

LF     = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE

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
