-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (31 loc) · 1.65 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
33
34
35
36
37
38
39
40
41
42
43
CC = gcc
CFLAGS = -O3
GSLFLAGS = -lgsl -lgslcblas -lm
COMMON_INCLUDES = definitions.h includes.h
MATH_INCLUDES = math_includes.h
COMMON_OBJECTS = neuron.o general.o main.o currents.o stimulate.o plasticity.o
UNTHREADED_OBJECTS = $(COMMON_OBJECTS) ode_unthreaded.o
THREADED_OBJECTS = $(COMMON_OBJECTS) ode_threaded.o
all : threaded unthreaded
threaded: $(COMMON_OBJECTS) $(THREADED_OBJECTS) Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) $(THREADED_OBJECTS) -pthread -o threaded
unthreaded: $(COMMON_OBJECTS) $(UNTHREADED_OBJECTS) Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) $(UNTHREADED_OBJECTS) -o unthreaded
neuron.o: $(COMMON_INCLUDES) neuron.h neuron.c Makefile
$(CC) $(CFLAGS) -c neuron.c
general.o: $(COMMON_INCLUDES) general.h general.c Makefile
$(CC) $(CFLAGS) -c general.c
ode_unthreaded.o: $(COMMON_INCLUDES) $(MATH_INCLUDES) currents.c ode.h ode.c Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) -c ode.c -o ode_unthreaded.o
ode_threaded.o: $(COMMON_INCLUDES) $(MATH_INCLUDES) currents.c ode.h ode.c Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) -pthread -DTHREADED -c ode.c -o ode_threaded.o
currents.o: $(COMMON_INCLUDES) $(MATH_INCLUDES) neuron.h currents.h currents.c Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) -c currents.c -o currents.o
stimlate.o: $(COMMON_INCLUDES) $(MATH_INCLUDES) neuron.h stimulate.h stimulate.c Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) -c stimulate.c -o stimulate.o
plasticity.o: $(COMMON_INCLUDES) $(MATH_INCLUDES) neuron.h plasticity.h plasticity.c Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) -c plasticity.c -o plasticity.o
main.o: $(COMMON_INCLUDES) general.h neuron.h ode.h main.c Makefile
$(CC) $(CFLAGS) $(GSLFLAGS) $(THREADING) -c main.c
clean:
-rm *.o threaded unthreaded