###################################
# makefile (may/2000)             #
# makefile for eval lite 0.5 beta #
###################################
#
###############
#  using  cc  #
# not tested  #
###############
# compiler cc
#
# CC      = cc
# config of compiler
# CFLAGS  = -c -g -o
# option for link
# LFLAGS  = -o
# library (math)
# LIBS    = -lm
####################################
# GCC compiler with optimization
#
# CC        = gcc
# options:
# Wall: All warnnig messages.
# c: compile
# o: the output file name is ...
# O3 level 3 optimizations
# CFLAGS = -Wall -O3 -c -o
# link options
# -o indicate the output file name (executable)
# LFLAGS    = -o
# library (math)
# -lm: use math library
# LIBS      = -lm
# m is the math library
############################################
# compilling with gcc in the debug mode
#
CC        = gcc
# option of compiler:
# Wall: all warnning messages
# c: compile
# o: the output file name is ...
# ggdb: native debug information and gdb extensions
CFLAGS = -Wall -ggdb -c -o
# linking options
# -o indicate the final program name
LFLAGS    = -o
# library (math).
# -lm: use math library
LIBS      = -lm
# m are the math library
############################################
# files used
#
# list of object files for linking
OBJECTS = evallt.o examp1.o examp2.o examp3.o
#
# linking the examples
examples: $(OBJECTS)
#	$(CC) $(OBJECTS) $(LFLAGS) evallt $(LIBS)
	$(CC) evallt.o examp1.o $(LFLAGS) examp1 $(LIBS)
	$(CC) evallt.o examp2.o $(LFLAGS) examp2 $(LIBS)
	$(CC) evallt.o examp3.o $(LFLAGS) examp3 $(LIBS)
#
# compile each files

evallt.o:  evallt.c
	$(CC) evallt.c $(CFLAGS) evallt.o

examp1.o:  examp1.c evallt.h
	$(CC) examp1.c $(CFLAGS) examp1.o

examp2.o:  examp2.c evallt.h
	$(CC) examp2.c $(CFLAGS) examp2.o

examp3.o:  examp3.c evallt.h
	$(CC) examp3.c $(CFLAGS) examp3.o

# clear the object files
# warnnings: it delete evallt.o
# activate by make clear

clear:
	rm $(OBJECTS)

# end of makefile
