From 62ad0ca48994081ff994258f6a6037763c87c4cd Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 24 May 2017 20:29:28 -0400 Subject: [PATCH] tweak makefile to build on systems with insane default LD commands (I'm looking at you Ubuntu) --- TODO.md | 2 +- config.mk | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 6daf18e..07058e0 100644 --- a/TODO.md +++ b/TODO.md @@ -2,13 +2,13 @@ Up Next: -* use transaction ids to only mark buffer dirty when it really is * Make Fn keys execute nth command in the tags buffers * move by words is inconsistent. Example: var infoId = 'readerinfo'+reader.id; The Future: +* use transaction ids to only mark buffer dirty when it really is * refactor selection handling to buf.c to prepare for multiple selections. * 100% coverage with unit and unit-integration tests * right click to fetch file or line diff --git a/config.mk b/config.mk index 61ab9b2..3a522b1 100644 --- a/config.mk +++ b/config.mk @@ -13,7 +13,7 @@ INCS += -I/usr/include/freetype2 # Compiler Setup CC = cc -CFLAGS = --std=c99 -MMD -g -O0 $(INCS) +CFLAGS = --std=c99 -MMD $(INCS) # Linker Setup LD = $(CC) @@ -26,13 +26,19 @@ ARFLAGS = rcs # Treat all warnings as errors (poor man's lint?) #CFLAGS += -Wall -Wextra -Werror +# GCC Debugging +ifeq ($(DEBUG), 1) + CFLAGS += -g -O0 + LDFLAGS += -g -O0 +endif + # GCC Profiling ifeq ($(GPROF), 1) CFLAGS += -pg LDFLAGS += -pg endif -# Gcov Coverage +# GCC Coverage ifeq ($(GCOV), 1) CFLAGS += --coverage LDFLAGS += --coverage -- 2.52.0