File tree 3 files changed +20
-7
lines changed
3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 1
1
* .o
2
2
* flops
3
+ * .dSYM /
4
+ * flops- *
Original file line number Diff line number Diff line change 1
1
CPPFLAGS += -fopenmp -O3 -g -march=native
2
2
3
- all : sseflops avxflops
3
+ ifneq ($(CXX ) ,c++)
4
+ ifneq ($(CXX ) ,g++)
5
+ SUFFIX := -$(CXX )
6
+ endif
7
+ endif
4
8
5
- sseflops : sseflops.o
6
- $(CXX ) -o $@ $< $(CXXFLAGS ) $(CPPFLAGS ) $(LDFLAGS )
9
+ TESTS := sseflops$(SUFFIX ) avxflops$(SUFFIX )
7
10
8
- avxflops : avxflops.o
9
- $(CXX ) -o $@ $< $(CXXFLAGS ) $(CPPFLAGS ) $(LDFLAGS )
11
+ all : $(TESTS )
12
+
13
+ clean :; rm -f $(TESTS ) $(addsuffix .o, $(TESTS ) )
10
14
11
- clean :
12
- rm -f * .o
15
+ .SECONDARY :
16
+
17
+ % $(SUFFIX ) .o :: % .cc
18
+ $(CXX ) -o $@ -c $< $(CXXFLAGS ) $(CPPFLAGS )
19
+
20
+ % $(SUFFIX ) : % $(SUFFIX ) .o
21
+ $(CXX ) -o $@ $< $(CXXFLAGS ) $(CPPFLAGS ) $(LDFLAGS )
Original file line number Diff line number Diff line change 7
7
-----
8
8
9
9
Just ` make ` then run. If you do not have min. * Sandy Bridge / AVX* CPU ` avxflops ` build will fail, but you can still test with ` sseflops ` .
10
+
11
+ Use ` make CXX=c++compiler ` to build test with other compiler, the output files will be suffixed with ` -c++compiler ` .
You can’t perform that action at this time.
0 commit comments