# LIFAPC - Automne 2023 - R. Chaine

# Pour compiler utiliser simplement la commande make (ou make main.ex)

CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes
CFLAGS += -D NDEBUG # A commenter pour compiler en mode debug

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

main.ex : main.o SkipList.o element.o
# L'executable main.ex doit tre remis  jour si certains des fichiers 
# main.o SkipList.o et element.o sont plus rcents
	$(CXX) main.o SkipList.o element.o -omain.ex

element.o : element.cpp element.h
# Le fichier objet element.o doit tre remis  jour si certains des fichiers
#  element.cpp et element.h sont plus rcents
	$(CXX) $(CFLAGS) -c element.cpp

SkipList.o : SkipList.cpp SkipList.h element.h
# Le fichier objet SkipList.o doit tre remis  jour si certains des fichiers
# SkipList.cpp SkipList.h et element.h sont plus rcents
	$(CXX) $(CFLAGS) -c SkipList.cpp 

main.o : main.cpp SkipList.h element.h
# Le fichier objet main.o doit tre remis  jour si certains des fichiers
# main.cpp SkipList.h et element.h sont plus rcents
	$(CXX) $(CFLAGS) -c main.cpp

clean :
	-rm *.o *~

veryclean : clean 
	-rm *.ex

