-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (28 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Compiler options
CC = gcc
#CFLAGS = -g -Wall
CFLAGS = -D NDEBUG
GSLCFLAGS = -lgsl -lgslcblas -lm
# Either ffmpeg or imagemagick has to be installed to make gifs. Enable the one
# to be used (ffmpeg is faster)
GIFFLAGS = -D FFMPEG
#GIFFLAGS = -D IMAGEMAGICK
# Build directory
BUILD = build
# Dependency rules for non-file targets
all: build simulate
clean:
rm -rf $(BUILD) simulate
build:
mkdir $(BUILD)
# Dependency rules for file targets
simulate: $(BUILD)/simulate.o $(BUILD)/importdata.o $(BUILD)/asolve.o $(BUILD)/plot.o
$(CC) $(CFLAGS) $(GSLCFLAGS) $(BUILD)/simulate.o $(BUILD)/importdata.o $(BUILD)/asolve.o $(BUILD)/plot.o -o simulate
$(BUILD)/simulate.o: simulate.c importdata.h asolve.h types.h
$(CC) $(CFLAGS) -c simulate.c -o $(BUILD)/simulate.o
$(BUILD)/importdata.o: importdata.c importdata.h types.h
$(CC) $(CFLAGS) -c importdata.c -o $(BUILD)/importdata.o
$(BUILD)/asolve.o: asolve.c asolve.h types.h
$(CC) $(CFLAGS) -c asolve.c -o $(BUILD)/asolve.o
$(BUILD)/plot.o: plot.c plot.h types.h
$(CC) $(CFLAGS) $(GIFFLAGS) -c plot.c -o $(BUILD)/plot.o