You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
623 B

  1. # compiler, tools
  2. CC = clang
  3. PKG_CONFIG ?= pkg-config
  4. # flags
  5. CFLAGS ?= -march=native -O2 -pipe
  6. CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-parameter -Wno-unused-function
  7. ifeq ($(shell $(CC) -v 2>&1 | grep 'gcc version' &>/dev/null && echo 1),1)
  8. CFLAGS += -Wno-unused-but-set-variable
  9. endif
  10. LDFLAGS ?= -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
  11. ifndef NODEBUG
  12. CFLAGS += -O0 -g3
  13. endif
  14. # install variables
  15. INSTALL = install
  16. INSTALL_BIN = install -m755
  17. INSTALL_DIR = install -d
  18. PREFIX = /usr/local
  19. LIBDIR = lib64
  20. INSTALL_BINDIR = $(PREFIX)/bin
  21. INSTALL_LIBDIR = $(PREFIX)/$(LIBDIR)