Add compile optimization options (as default).
authorFreeBirdLjj <ljj11011@mail.ustc.edu.cn>
Wed, 17 Sep 2014 14:59:16 +0000 (22:59 +0800)
committerFreeBirdLjj <ljj11011@mail.ustc.edu.cn>
Wed, 17 Sep 2014 14:59:16 +0000 (22:59 +0800)
Makefile
README.md

index de3c650..1748cbd 100644 (file)
--- a/Makefile
+++ b/Makefile
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 #
 
-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)
index 8097bf4..8f58d78 100644 (file)
--- 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