pqc/common.mk

21 lines
554 B
Makefile
Raw Normal View History

2014-05-27 23:38:55 +00:00
# compiler, tools
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
# install variables
INSTALL = install
INSTALL_BIN = install -m755
INSTALL_DIR = install -d
PREFIX = /usr/local
LIBDIR = lib64
INSTALL_BINDIR = $(PREFIX)/bin
INSTALL_LIBDIR = $(PREFIX)/$(LIBDIR)