-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 820 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 820 Bytes
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
# Makefile for final project
cxx = g++ -fopenmp
cflags = -Wall -ggdb -O3 #-fsanitize=address -ansi -pedantic
clibs = -lgsl
# Lists of files to be built
objs = fsal_rk4d.o swarm_ode.o
src=$(patsubst %.o,%.cc,$(objs) $(mg_objs))
execs = basic_swarm forced_swarm finite_swarm
all: $(execs)
# Include the file dependencies
-include Makefile.dep
# A Makefile target to refresh the dependency file
depend:
$(cxx) -MM $(src) >Makefile.dep
# A Makefile target to remove all the built files
clean:
rm -f $(execs) $(objs)
%.o: %.cc
$(cxx) $(cflags) -c $< $(clibs)
basic_swarm: run_basic_swarm.cc $(objs)
$(cxx) $(cflags) -o $@ $^ $(clibs)
forced_swarm: run_forced_swarm.cc $(objs)
$(cxx) $(cflags) -o $@ $^ $(clibs)
finite_swarm: run_finite_swarm.cc $(objs)
$(cxx) $(cflags) -o $@ $^ $(clibs)
.PHONY: clean depend