place main.c under etc/

This commit is contained in:
Yuichi Nishiwaki 2013-10-20 18:44:26 +09:00
parent 05eb62cc4d
commit d57d8ff3c0
2 changed files with 7 additions and 3 deletions

View File

@ -1,15 +1,19 @@
CC=gcc CC=gcc
all: build run all: build-lib build-main run
build: build-main:
$(CC) -Wall -o bin/picrin -I./include -L./lib -lpicrin -lreadline etc/main.c
build-lib:
cd src; \ cd src; \
yacc -d parse.y; \ yacc -d parse.y; \
lex scan.l lex scan.l
$(CC) -Wall -o bin/picrin -I./include -lreadline src/main.c src/state.c src/gc.c src/pair.c src/port.c src/symbol.c src/value.c src/y.tab.c src/lex.yy.c src/bool.c src/vm.c src/init.c src/number.c src/time.c src/codegen.c src/error.c $(CC) -Wall -shared -o lib/libpicrin.so -I./include -lreadline src/state.c src/gc.c src/pair.c src/port.c src/symbol.c src/value.c src/y.tab.c src/lex.yy.c src/bool.c src/vm.c src/init.c src/number.c src/time.c src/codegen.c src/error.c
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
rm -f lib/libpicrin.so
rm -f bin/picrin rm -f bin/picrin
run: run: