From 979a1dd80b99a22346541bda2f00983d44f24b64 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Wed, 30 Oct 2013 16:36:21 +0900 Subject: [PATCH] add make release command --- Makefile | 16 +++++++++++----- include/picconf.h | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a279c7f0..e5d1d2c3 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,23 @@ CC=gcc +CFLAGS=-Wall -g -all: build run +all: build-debug run + +release: build run + +build-debug: CFLAGS += -DDEBUG=1 +build-debug: build build: build-lib build-main build-main: - $(CC) -Wall -g tools/main.c -o bin/picrin -I./include -L./lib -lpicrin -lreadline + $(CC) $(CFLAGS) tools/main.c -o bin/picrin -I./include -L./lib -lpicrin -lreadline build-lib: cd src; \ - yacc -d parse.y; \ - lex scan.l - $(CC) -Wall -g -shared src/*.c -o lib/libpicrin.so -I./include -I./extlib + yacc -d parse.y; \ + lex scan.l + $(CC) $(CFLAGS) -shared src/*.c -o lib/libpicrin.so -I./include -I./extlib clean: rm -f src/y.tab.c src/y.tab.h src/lex.yy.c diff --git a/include/picconf.h b/include/picconf.h index 9c6c28a0..b3225fdf 100644 --- a/include/picconf.h +++ b/include/picconf.h @@ -17,7 +17,7 @@ #define PIC_POOL_SIZE 1024 /* enable all debug flags */ -#define DEBUG 1 +/* #define DEBUG 1 */ #if DEBUG # define GC_DEBUG 1