-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (33 loc) · 1.29 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
44
45
46
# Warnings
WFLAGS := -Wall -Wextra -Wsign-conversion -Wsign-compare
# Optimization and architecture
OPT := -O3
ARCH := -march=native
# Language standard
CCSTD := -std=c99
CXXSTD := -std=c++11
EXEC := single_thread_out openmp_out cuda_fft cuda_fft_part1
# Linker options
LDOPT := $(OPT)
LDFLAGS :=
BIN = "/usr/local/gcc/6.4.0/bin/gcc"
.DEFAULT_GOAL := all
.PHONY: debug
debug : OPT := -O0 -g -fno-omit-frame-pointer -fsanitize=address
debug : LDFLAGS := -fsanitize=address
debug : ARCH :=
debug : $(EXEC)
all : $(EXEC)
#module load cuda;nvcc -o problem2 $(OPT) vector_reduction.cu vector_reduction_gold.cpp -ccbin $(BIN)
#module load cuda;nvcc -o problem3 $(OPT) problem3.cu -ccbin $(BIN)
single_thread_out: ofdm_tx.cpp
gcc -g $(CXXSTD) -lm -fopt-info -lstdc++ ofdm_tx.cpp -o single_thread_out
openmp_out: ofdm_openmp.cpp
gcc -g $(CXXSTD) -lm -fopt-info -lstdc++ -fopenmp ofdm_openmp.cpp -o openmp_out -DOMP -DOMP_ENCODE_PARALLEL
cuda_fft: ofdm_tx.cu
module load cuda;nvcc -o cuda_fft -O1 ofdm_tx.cu --ptxas-options=-v --use_fast_math -lcufft -ccbin $(BIN)
cuda_fft_part1: cuda_fft_part1.cu
module load cuda;nvcc -o cuda_fft_part1 -O1 cuda_fft_part1.cu --ptxas-options=-v --use_fast_math -lcufft -ccbin $(BIN)
.PHONY: clean
clean:
rm -f single_thread_out openmp_out cuda_fft cuda_fft_part1