~smlavine/navipage

7353c8c86836afcc31f7f36079e8a25c69c34ff4 — Sebastian LaVine 7 months ago df1e5c7
Use DEBUGFLAGS variable properly

Also, the debug target didn't work previously for two reasons: one,
DEBUGFLAGS would only be passed to the linker, not the compiler; and
two, there was a typo.
2 files changed, 4 insertions(+), 6 deletions(-)

M Makefile
M config.mk
M Makefile => Makefile +0 -3
@@ 22,9 22,6 @@ $(OBJ): config.mk
navipage: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

debug: $(OBJ)
	$(CC) -o navipage $(OBJ) $(LDFLAGS) $(DEBUGDLAGS)

clean:
	rm -f navipage $(OBJ)


M config.mk => config.mk +4 -3
@@ 9,11 9,12 @@ MANPREFIX = $(PREFIX)/share/man
INCS = -I$(PREFIX)/include
LIBS = -lreadline

#uncomment for debugging
#DEBUGFLAGS = -ggdb -Og

# flags
CPPFLAGS = $(INCS) -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
CFLAGS = -std=c99 -Wall -Wextra -Wpedantic
#uncomment for debugging
#CFLAGS = -g -Og -std=c99 -fsanitize=address -Wall -Wextra -Wpedantic
CFLAGS = -std=c99 -Wall -Wextra -Wpedantic $(DEBUGFLAGS)
LDFLAGS = -L$(PREFIX)/lib $(LIBS)

# compiler and linker