Makefile 375 Bytes
Newer Older
Damian S. Steiger's avatar
Damian S. Steiger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CXX=g++
CXXFLAGS=-Wall -std=c++11 -O2 

all: sum_serial sum_avx sum_auto

clean:
	rm -f sum_serial sum_avx sum_auto

sum_serial: sum_serial.cpp
	$(CXX) $(CXXFLAGS) -o $@ $<

sum_avx: sum_avx.cpp
	# $(CXX) $(CXXFLAGS) -mavx -Wa,-q -o $@ $< # for mac
	$(CXX) $(CXXFLAGS) -mavx -o $@ $< # for linux

sum_auto: sum_serial.cpp
	$(CXX) $(CXXFLAGS) -mavx -ftree-vectorize -o $@ $<