CCC = g++
FLAGS = -Wall -O
XLIB = /usr/X11R6/lib
XINCLUDE = /usr/X11R6/include/X11

all: test_aff test_env environ affich

environ: environnement.o monde.o

affich: affichage.o environ

test_env: environ test_environnement.o
	$(CCC) $(FLAGS) -o test_env test_environnement.o environnement.o \
	monde.o -lm

test_aff: affich test_affichage.o
	$(CCC) $(FLAGS) -o test_aff affichage.o test_affichage.o \
	environnement.o monde.o -L${XLIB} -I${XINCLUDE} -lX11

clean:
	rm -rf *.o test_env test_aff core

# regles explicites
.SUFFIXES: .cpp .o
.cpp.o:
	$(CCC) $(FLAGS) -c $<
