# Makefile for SharMot
# last revision : jan 04

# Note: the compilation has been tested in linux-i*86, a macosx, an irix 


SHELL=/bin/sh


CC=gcc
OPT=-O2 -Wall
LDFLAGS= -lm

INCLUDE= -I.

SRC = mem.c\
      output.c\
      matrix.c\
      waterman_eggert.c\
      traceback_SW.c\
      checkseq.c\
      tableR.c\
      readfst.c

OBJ = $(SRC:.c=.o)

BIN = sharmot

all: $(BIN)

$(BIN): $(OBJ) main_SharMot.c
	$(CC) -o $@ $(INCLUDE) $(OPT) $(OBJ) main_SharMot.c $(LDFLAGS)

%.o: %.c 
	$(CC) -c -o $@ $(INCLUDE) $(OPT) $<

clean:
	\rm -f $(BIN) *.o

archive: clean
	\rm -rf  SharMot; mkdir SharMot
	cp -r $(SRC) *.h Makefile main_SharMot.c SharMot;
	tar czvf SharMot.tgz SharMot;
	\rm -rf SharMot
