CC=gcc # --------------------------------------------- # - les differents flags pour les compilations: # --- pour activer les tests. CFLAGS=-DTEST_UNIT # --- pour faire une trace avec les tests. #CFLAGS=-DTEST_UNIT -DTRACE_ON # --- pour faire une trace, info de debug et tests. #CFLAGS=-DTEST_UNIT -DTRACE_ON -DDEBUG_ON # --- compilation livrable. #CFLAGS=-DNDEBUG # --------------------------------------------- OBJECTS=GrandNombres.o Exception.o Erreur.o NombreComplexes.o # cible de base. all: $(OBJECTS) main.o $(CC) $(CFLAGS) $(OBJECTS) main.o -o Mandel test: $(OBJECTS) test.o $(CC) $(CFLAGS) $(OBJECTS) test.o -o TestAll # compilation par defaut. .c.o: $(CC) $(CFLAGS) -c $< # dependance: main.o: main.c GrandNombres.h Tracer.h NombreComplexes.h test.o: test.c GrandNombres.h Exception.h Tracer.h NombreComplexes.h GrandNombres.o: GrandNombres.h GrandNombres.c Exception.h Tracer.h Erreur.h NombreComplexes.o: NombreComplexes.h NombreComplexes.c GrandNombres.h Exception.h Tracer.h Erreur.h Exception.o: Exception.h Exception.c Tracer.h Erreur.o: Erreur.h Erreur.c # nettoyage du repertoire. clean: \rm -f *.o \rm -f *~ \rm -f #*# \rm -f *.ppm \rm -f core \rm -f TestAll \rm -f Mandel