forked from topopt/TopOpt-in-OpenMP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
23 lines (17 loc) · 794 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
CFLAGS ?= -Wall -g -fno-omit-frame-pointer -fopenmp -O3 -march=native
LIBS ?= -lm -lopenblas -lcholmod
CC ?= gcc
CXX ?= g++
INCLUDEFILE = -I /usr/local/lib/SuiteSparse/CHOLMOD/Include -I /usr/local/lib/SuiteSparse/SuiteSparse_config
OBJ = stencil_methods.o multigrid_solver.o grid_utilities.o stencil_optimization.o local_matrix.o coarse_assembly.o coarse_solver.o write_vtk.o
all: top3d
top3d: top3d.c $(OBJ)
$(CC) -std=c11 $(CFLAGS) $(INCLUDEFILE) -o $@ $^ $(LIBS)
benchmark: benchmark.cpp $(OBJ)
$(CXX) -std=c++11 $(CFLAGS) -o $@ $^ $(LIBS) -lbenchmark -lpthread
test_stencil_methods: test_stencil_methods.c $(OBJ)
$(CC) -std=c11 $(CFLAGS) -o $@ $^ $(LIBS)
%.o: %.c
$(CC) -std=c11 $(CFLAGS) $(INCLUDEFILE) -o $@ -c $<
clean:
-rm -f benchmark test_stencil_methods core *.core *.o