add make release command

This commit is contained in:
Yuichi Nishiwaki 2013-10-30 16:36:21 +09:00
parent abd5bc9216
commit 979a1dd80b
2 changed files with 12 additions and 6 deletions

View File

@ -1,17 +1,23 @@
CC=gcc 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: build-lib build-main
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: build-lib:
cd src; \ cd src; \
yacc -d parse.y; \ yacc -d parse.y; \
lex scan.l lex scan.l
$(CC) -Wall -g -shared src/*.c -o lib/libpicrin.so -I./include -I./extlib $(CC) $(CFLAGS) -shared src/*.c -o lib/libpicrin.so -I./include -I./extlib
clean: clean:
rm -f src/y.tab.c src/y.tab.h src/lex.yy.c rm -f src/y.tab.c src/y.tab.h src/lex.yy.c

View File

@ -17,7 +17,7 @@
#define PIC_POOL_SIZE 1024 #define PIC_POOL_SIZE 1024
/* enable all debug flags */ /* enable all debug flags */
#define DEBUG 1 /* #define DEBUG 1 */
#if DEBUG #if DEBUG
# define GC_DEBUG 1 # define GC_DEBUG 1