-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
30 lines (21 loc) · 712 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
24
25
26
27
28
29
30
# Copyright (c) 2014 Bart Massey
# [This program is licensed under the "MIT License"]
# Please see the file LICENSE in the source
# distribution of this software for license terms.
GCC = gcc -O4
CLANG = clang -O3
GCCFLAGS = -Wall -march=native
CLANGFLAGS = -Wall -march=native
TARGETS = popcount_gcc popcount_clang popcount_rs
all: $(TARGETS)
popcount_gcc: popcount.c
$(GCC) $(GCCFLAGS) -o popcount_gcc popcount.c
popcount_clang: popcount.c
$(CLANG) $(CLANGFLAGS) -o popcount_clang popcount.c
target/release/popcount_rs: popcount.rs
RUSTFLAGS='-C target-cpu=native' cargo build --release
popcount_rs: target/release/popcount_rs
cp target/release/popcount_rs .
clean:
-rm -f $(TARGETS)
cargo clean