From f9a6aa5094b24fad0932eb29f72fe0a7a11adcc0 Mon Sep 17 00:00:00 2001 From: FreeBirdLjj Date: Wed, 17 Sep 2014 22:59:16 +0800 Subject: [PATCH] Add compile optimization options (as default). --- Makefile | 6 +++++- README.md | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index de3c650..1748cbd 100644 --- a/Makefile +++ b/Makefile @@ -18,11 +18,15 @@ # along with this program. If not, see . # -CFLAGS = -Wall -g +CFLAGS = -O3 LDLIBS = -lncurses OBJECTS = cstring.o cstack.o markdown.o parser.o viewer.o mdp.o DESTDIR ?= /usr/bin +ifeq ($(DEBUG),1) + CFLAGS := -Wall -g -O0 +endif + all: mdp mdp: $(OBJECTS) diff --git a/README.md b/README.md index 8097bf4..8f58d78 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,11 @@ _Review sample.md for more details._ - 1-9 - go to slide n - q - exit + +--- + +*How to debug it:* + +To make a debug version of `mdp`, just type: + + $ make DEBUG=1 -- 2.20.1