config.mk (1014B)
1 # spm version 2 VERSION = 0.1 3 4 # paths 5 PREFIX = /usr/local 6 MANPREFIX = ${PREFIX}/share/man 7 8 # Linux/BSD common flags 9 CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os 10 LDFLAGS = -s 11 LIBS = -lncurses -lsodium 12 13 # OS-specific flags 14 UNAME_S := $(shell uname -s) 15 16 # Linux 17 ifeq ($(UNAME_S),Linux) 18 # Void Linux specific paths (default) 19 INCS = -I/usr/include 20 LIBS += -L/usr/lib 21 endif 22 23 # OpenBSD 24 ifeq ($(UNAME_S),OpenBSD) 25 INCS = -I${PREFIX}/include 26 LIBS += -L${PREFIX}/lib 27 endif 28 29 # FreeBSD 30 ifeq ($(UNAME_S),FreeBSD) 31 INCS = -I${PREFIX}/include 32 LIBS += -L${PREFIX}/lib 33 endif 34 35 # NetBSD 36 ifeq ($(UNAME_S),NetBSD) 37 INCS = -I${PREFIX}/include 38 LIBS += -L${PREFIX}/lib 39 endif 40 41 # Debug build 42 # Uncomment these for debugging 43 #CFLAGS = -std=c99 -pedantic -Wall -O0 -g 44 #LDFLAGS = -g 45 46 # compiler and linker 47 CC = cc 48 49 # Feature flags 50 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" 51 52 # Final flags 53 CFLAGS += ${INCS} ${CPPFLAGS} 54 LDFLAGS += ${LIBS}