# version avec deux variables CXX et CXXFLAGS

# Makefile

CXX = g++
CXXFLAGS = -g -Wall -std=c++11

all: eatFruit

fruits.o   :  fruits.cc fruits.h
	$(CXX) $(CXXFLAGS) -c fruits.cc -o fruits.o

persons.o  :  persons.cc persons.h fruits.h
	$(CXX) $(CXXFLAGS) -c persons.cc -o persons.o

eatFruit.o :  fruits.h persons.h eatFruit.cc
	$(CXX) $(CXXFLAGS) -c eatFruit.cc -o eatFruit.o

eatFruit   :  fruits.o persons.o eatFruit.o
	$(CXX) eatFruit.o persons.o fruits.o -o eatFruit
