-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 764 Bytes
/
Makefile
File metadata and controls
36 lines (26 loc) · 764 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
CC=gcc
CXX=g++
CFLAGS=-pipe -Wall -O3 -D_GNU_SOURCE -fomit-frame-pointer -ffast-math -ffinite-math-only -march=native -mfpmath=sse -msse3
LDFLAGS=-lm
.PHONY: all
all: mandel nbody_c nbody_cc cython_nbody2.so
mandel: mandel.c
@echo "Building $@"
$(CC) -o $@ -std=c99 $(CFLAGS) mandel.c -lm
nbody_cc: nbody.cc
@echo "Building $@"
$(CXX) -o $@ -std=c++11 $(CFLAGS) $<
nbody_c: nbody.c
@echo "Building $@"
gcc -o $@ $(CFLAGS) $< $(LDFLAGS)
cython_nbody2.html: cython_nbody2.pyx
@echo "Building $@"
cython $< -a
cython_nbody2.so: cython_nbody2.pyx
@echo "Building $@"
python setup.py build_ext --inplace
.PHONY: doc
doc: cython_nbody2.html
.PHONY: clean
clean:
$(RM) mandel nbody_c nbody_cc cython_nbody2.so cython_nbody2.c cython_nbody2.html