# Makefile for cahn_hilliard microstructural evolution visualization CFLAGS = -Wall -DHAVE_INLINE -std=c99 -O3 LFLAGS = -O3 LIBS = -lgsl -lfftw3 -lgd -lm sources = cahn_hilliard.c evolve.c snapshot.c test_input_data.c objects = cahn_hilliard.o evolve.o snapshot.o test_input_data.o headers = functions.h # Directory paths for the source and header files vpath %.c src vpath %.h src ch: $(objects) gcc $(LFLAGS) -o $@ $^ $(LIBS) cahn_hilliard.o: cahn_hilliard.c functions.h evolve.o: evolve.c functions.h gcc -c $(CFLAGS) $< #-------------------------------------------- ch.gif: ch ./ch gifsicle -o ch.gif -d 10 output/*.gif #-------------------------------------------- clean: rm -rf *.o *~ veryclean: rm -rf *.o *~ ch output/*.gif ch.gif