CC=g++

LD=g++

RM=rm -f

CXXFLAGS=-Wall -Werror -ansi -pedantic -g

#CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer
#LDFLAGS=-s

OBJS := $(patsubst %.cpp,%.o,$(wildcard *.cpp))

MAIN = main

all: $(MAIN)

$(MAIN): $(OBJS)
	$(LD) $(LDFLAGS) $(OBJS) -o $(MAIN)  -lm 

%.o: %.cpp include.h 
	$(CC) $(CXXFLAGS) -c $<

clean:
	$(RM) $(OBJS) core.* *~ *.out *.o

