add Makefile and config.mk

This commit is contained in:
Hiltjo Posthuma
2015-12-05 21:07:52 +01:00
parent 8b6a646b7a
commit b069cb6fd5
2 changed files with 102 additions and 0 deletions

30
config.mk Normal file
View File

@@ -0,0 +1,30 @@
# customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
GITINC = /usr/local/include
GITLIB = /usr/local/lib
# includes and libs
INCS = -I${GITINC}
LIBS = -L${GITLIB} -lgit2 -lc
# debug
CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedantic \
-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE ${INCS}
LDFLAGS = ${LIBS}
# optimized
#CFLAGS = -O2 -std=c99 \
# -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE ${INCS}
#LDFLAGS = -s ${LIBS}
# optimized static
#CFLAGS = -static -O2 -std=c99 \
# -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE ${INCS}
#LDFLAGS = -static -s ${LIBS}
# compiler and linker
#CC = cc