CC = gcc

HDRS =  type.h defaults.h case.h random.h utils.h select.h finders.h \
	dist.h init.h 

SRCS =  xover.c gen.c init.c cigar.c report.c \
	statistics.c  random.c  select.c utils.c halve.c scale.c \
	finders.c hms.c case.c dist.c\
	pmx.c evalpop.c

OBJS =  xover.o gen.o init.o cigar.o report.o \
	statistics.o  random.o  select.o utils.o halve.o scale.o \
	finders.o hms.o case.o  dist.o\
	pmx.o evalpop.o

APPHDRS = app.h

APPSRCS = app.c 

APPOBJS = app.o

INFILE  = infile

CFLAGS =  -O3 -Wall -fomit-frame-pointer -finline-functions -ffast-math
CLIBS = -lm 

cigar	: $(OBJS) $(APPOBJS)
	$(CC) -o cigar $(OBJS) $(APPOBJS) $(CLIBS)

clean	: 
	rm $(OBJS) $(APPOBJS)
	touch $(HDRS) $(APPHDRS)

dist	:
	rm cigar.tgz
	tar -cvzf cigar.tgz $(HDRS) $(APPHDRS) $(SRCS) $(APPSRCS) $(INFILE) Makefile appinfile main.c

$(OBJS)	: $(HDRS) $(APPHDRS)

$(APPOBJS)	:	$(APPHRDS)
