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