-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (24 loc) · 918 Bytes
/
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
33
34
35
36
37
38
TARGET = project
default: $(TARGET)
CC = gcc
CFLAGS = -O3 -march=native
WARN = -Wall
DEFS = -std=c11 -fopenmp
OBJS = MersenneTwister.o RandomProcesses.o
OBJS += ImplicitEulerSolver.o CSTR.o
LIBS = -lm -L/usr/lib64/atlas -lsatlas
_DIST_HEADERS = MersenneTwister.h RandomProcesses.h ImplicitEulerSolver.h CSTR.h
MersenneTwister.o: MersenneTwister.c $(_DIST_HEADERS)
$(CC) $(WARN) $(DEFS) -c $< $(INCLUDES) $(CFLAGS)
RandomProcesses.o: RandomProcesses.c $(_DIST_HEADERS)
$(CC) $(WARN) $(DEFS) -c $< $(INCLUDES) $(CFLAGS)
ImplicitEulerSolver.o: ImplicitEulerSolver.c $(_DIST_HEADERS)
$(CC) $(WARN) $(DEFS) -c $< $(INCLUDES) $(CFLAGS)
CSTR.o: CSTR.c $(_DIST_HEADERS)
$(CC) $(WARN) $(DEFS) -c $< $(INCLUDES) $(CFLAGS)
$(TARGET).o: $(TARGET).c $(_DIST_HEADERS)
$(CC) $(WARN) $(DEFS) -c $< $(INCLUDES) $(CFLAGS)
project: project.o $(OBJS)
$(CC) $(WARN) $(DEFS) -o $@ $^ $(LIBS)
clean:
rm -f *.o $(TARGET)