-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (29 loc) · 750 Bytes
/
makefile
File metadata and controls
38 lines (29 loc) · 750 Bytes
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
#
# makefile
# This file is part of tripforce.
# See tripforce.c for copyright or LICENSE for license information.
#
CC=gcc
CFLAGS=-O3 -ansi -march=native
LDFLAGS=-lcrypto -fopenmp
INSTALLDIR=/usr/local/bin
OUTPUT=tripforce
INPUT=$(wildcard *.c)
# OS X compatibility
OS_STR=$(shell uname -s)
ifeq ($(OS_STR), Darwin)
CC=clang-omp
LDFLAGS=-lcrypto -lssl -fopenmp -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include
endif
.PHONY: all install uninstall remove clean profile
all: $(INPUT)
$(CC) $(CFLAGS) -o $(OUTPUT) $(INPUT) $(LDFLAGS)
install: all
mv $(OUTPUT) $(INSTALLDIR)
uninstall:
rm -rf $(INSTALLDIR)/$(OUTPUT)
remove: uninstall
clean:
rm -rf $(OUTPUT) $(wildcard *.out)
profile: clean
$(CC) -pg $(INPUT) $(LDFLAGS)