-
Notifications
You must be signed in to change notification settings - Fork 9
/
official
31 lines (22 loc) · 828 Bytes
/
official
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
# makefile for official compiles, used by AppVeyor
# Compiler
# Linux: clang or gcc
# Linux->Windows cross: x86_64-w64-mingw32-gcc
# Linux->Android cross: arm-linux-gnueabihf-gcc -fPIE
CC = clang
# Compilation flags
CF = -std=gnu11 -DNDEBUG -O3 -flto -Wfatal-errors -Wall -Wextra -Wshadow
# Linking flags
LF = -s -lm -lpthread
# Output file name (add .exe for Windows)
EXE = demolito
# Automatic versioning: ISO format date YYYY-MM-DD from the last commit
VERSION = $(shell git show -s --format=%ci | cut -d\ -f1)
no_popcnt:
$(CC) -march=core2 $(CF) -DVERSION=\"$(VERSION)\" ./src/*.c -o $(EXE) -static $(LF)
popcnt:
$(CC) -mpopcnt $(CF) -DVERSION=\"$(VERSION)\" ./src/*.c -o $(EXE) -static $(LF)
pext:
$(CC) -mpopcnt -mbmi2 -DPEXT $(CF) -DVERSION=\"$(VERSION)\" ./src/*.c -o $(EXE) -static $(LF)
clean:
rm $(EXE)