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
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

View File

@ -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