From: FreeBirdLjj Date: Wed, 17 Sep 2014 14:59:16 +0000 (+0800) Subject: Add compile optimization options (as default). X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=f9a6aa5094b24fad0932eb29f72fe0a7a11adcc0;p=smdp.git Add compile optimization options (as default). --- 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