From d57d8ff3c067d35d1fecff574b0b7604fa7a4c59 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 20 Oct 2013 18:44:26 +0900 Subject: [PATCH] place main.c under etc/ --- Makefile | 10 +++++++--- {src => etc}/main.c | 0 2 files changed, 7 insertions(+), 3 deletions(-) rename {src => etc}/main.c (100%) diff --git a/Makefile b/Makefile index 677a3673..45845cf4 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,19 @@ 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; \ yacc -d parse.y; \ 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: rm -f src/y.tab.c src/y.tab.h src/lex.yy.c + rm -f lib/libpicrin.so rm -f bin/picrin run: diff --git a/src/main.c b/etc/main.c similarity index 100% rename from src/main.c rename to etc/main.c