2014-05-27 23:38:55 +00:00
|
|
|
# compiler, tools
|
2014-06-02 19:41:09 +00:00
|
|
|
CC = $(shell type -P clang || echo gcc)
|
2014-05-27 23:38:55 +00:00
|
|
|
PKG_CONFIG ?= pkg-config
|
|
|
|
|
|
|
|
# flags
|
|
|
|
CFLAGS ?= -march=native -O2 -pipe
|
|
|
|
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-parameter -Wno-unused-function
|
2014-05-30 23:38:21 +00:00
|
|
|
ifeq ($(CC),gcc)
|
2014-05-27 23:38:55 +00:00
|
|
|
CFLAGS += -Wno-unused-but-set-variable
|
|
|
|
endif
|
|
|
|
LDFLAGS ?= -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
|
|
|
|
|
2014-06-05 15:00:14 +00:00
|
|
|
# install/uninstall variables
|
|
|
|
RM = rm
|
|
|
|
LN_S = ln -s
|
2014-05-27 23:38:55 +00:00
|
|
|
INSTALL = install
|
|
|
|
INSTALL_BIN = install -m755
|
|
|
|
INSTALL_DIR = install -d
|
|
|
|
PREFIX = /usr/local
|
|
|
|
LIBDIR = lib64
|
|
|
|
INSTALL_BINDIR = $(PREFIX)/bin
|
|
|
|
INSTALL_LIBDIR = $(PREFIX)/$(LIBDIR)
|
2014-06-05 16:14:18 +00:00
|
|
|
INSTALL_INCLUDEDIR = $(PREFIX)/include/ntru
|