24 lines
629 B
Makefile
24 lines
629 B
Makefile
# compiler, tools
|
|
CC = $(shell type -P clang || echo gcc)
|
|
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
|
|
ifeq ($(CC),gcc)
|
|
CFLAGS += -Wno-unused-but-set-variable
|
|
endif
|
|
LDFLAGS ?= -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
|
|
|
|
# install/uninstall variables
|
|
RM = rm
|
|
LN_S = ln -s
|
|
INSTALL = install
|
|
INSTALL_BIN = install -m755
|
|
INSTALL_DIR = install -d
|
|
PREFIX = /usr/local
|
|
LIBDIR = lib64
|
|
INSTALL_BINDIR = $(PREFIX)/bin
|
|
INSTALL_LIBDIR = $(PREFIX)/$(LIBDIR)
|
|
INSTALL_INCLUDEDIR = $(PREFIX)/include/ntru
|