stagit

my fork of stagit that runs this site
git clone git://git.jakekoroman.com/stagit
Log | Files | Refs | README | LICENSE

commit cd6a519813d97f6c28ad80d6bc08ad58e14ee401
parent 761417d254f730739b1572f3a11185e01f28821b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 20 Mar 2016 16:23:33 +0100

Makefile: separate CPPFLAGS, compile optimized build by default

Diffstat:
MMakefile | 7+++++--
Mconfig.mk | 14++++++--------
2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,7 +1,7 @@ include config.mk NAME = stagit -VERSION = 0.3 +VERSION = 0.3.1 SRC = \ stagit.c\ stagit-index.c @@ -30,8 +30,11 @@ OBJ = ${SRC:.c=.o} ${COMPATOBJ} all: $(BIN) +.o: + ${CC} ${LDFLAGS} -o $@ ${LIBS} + .c.o: - ${CC} -c ${CFLAGS} $< + ${CC} -c ${CFLAGS} ${CPPFLAGS} -o $@ -c $< dist: rm -rf stagit-${VERSION} diff --git a/config.mk b/config.mk @@ -12,19 +12,17 @@ INCS = -I${GITINC} LIBS = -L${GITLIB} -lgit2 -lc # debug -CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedantic \ - -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE ${INCS} -LDFLAGS = ${LIBS} +#CFLAGS = -fstack-protector-all -O0 -g -std=c99 -Wall -Wextra -pedantic ${INCS} +#LDFLAGS = ${LIBS} # optimized -#CFLAGS = -O2 -std=c99 \ -# -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE ${INCS} -#LDFLAGS = -s ${LIBS} +CFLAGS = -O2 -std=c99 ${INCS} +LDFLAGS = -s ${LIBS} # optimized static -#CFLAGS = -static -O2 -std=c99 \ -# -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE ${INCS} +#CFLAGS = -static -O2 -std=c99 ${INCS} #LDFLAGS = -static -s ${LIBS} +CPPFLAGS= -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE -D_BSD_SOURCE ${INCS} # compiler and linker #CC = cc