From eecbd521f95c552f537fe9f2949b36d8795c102f Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Thu, 19 Apr 2018 15:07:21 -0600 Subject: Makefile: added debug target and set std to gnu99 --- c/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/c/Makefile b/c/Makefile index 9938411..126e76e 100644 --- a/c/Makefile +++ b/c/Makefile @@ -1,12 +1,15 @@ out = gpgsecure cc = cc -std = --std=c99 +std = -std=gnu99 warnings = -Wall -Wpedantic ccopts = $(std) $(warnings) larchive = $(shell pkg-config --libs libarchive) all: if [ ! -d obj ]; then mkdir obj; fi - $(cc) $(ccopts) $(larchive) -c src/encarchive.c -o obj/encarchive.o - $(cc) $(ccopts) $(larchive) src/main.c obj/*.o -o $(out) + $(cc) $(ccopts) $(dbg) $(larchive) -c src/encarchive.c -o obj/encarchive.o + $(cc) $(ccopts) $(dbg) $(larchive) src/main.c obj/*.o -o $(out) + +debug: + make dbg=-g -- cgit v1.2.3