add make release command
This commit is contained in:
parent
abd5bc9216
commit
979a1dd80b
16
Makefile
16
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue