# Makefile for cahn_hilliard microstructural evolution visualization CC = clang CFLAGS = -Wall -std=c99 -O3 LFLAGS = -O3 LIBS = -lgsl -lfftw3 -lgd -lm sources = cahn_hilliard.c evolve.c snapshot.c objects = cahn_hilliard.o evolve.o snapshot.o headers = functions.h #-------------------------------------------- ch: $(objects) $(CC) $(LFLAGS) -o $@ $^ $(LIBS) cahn_hilliard.o: cahn_hilliard.c functions.h $(CC) -c $(CFLAGS) $< evolve.o: evolve.c functions.h $(CC) -c $(CFLAGS) $< snapshot.o: snapshot.c functions.h $(CC) -c $(CFLAGS) $< #-------------------------------------------- ch.gif: ch gifsicle -o ch.gif -d10 -l100 -O output/*.gif #-------------------------------------------- clean: rm -f *.o *~ veryclean: clean rm -rf ch output/*.gif output/README ch.gif