# Makefile for compiling NSGA-II source code
# use command in run for getting the result.. change the parameters in feng
# the objectvie function is available in the file problemdef.c
# since many a times program would goof the succlist for the 0th activity they need to be scanned again and again
# this is a possible drawback

CC=gcc
LD=gcc
RM=rm -f
CFLAGS=-Wall -ansi -pedantic -g
OBJS:=$(patsubst %.c,%.o,$(wildcard *.c))
MAIN=nsga2r 
all:$(MAIN) #run 
$(MAIN):$(OBJS)
	$(LD) $(LDFLAGS) $(OBJS) -o $(MAIN) -lm
%.o: %.c global.h rand.h
	$(CC) $(CFLAGS) -c $<
run:
	./nsga2r 0.3782 <feng	
clean:
	$(RM) $(OBJS)

