statically link libraries

This commit is contained in:
Yuichi Nishiwaki 2013-11-17 18:04:38 +09:00
parent 947bed96ff
commit 7972c5636a
1 changed files with 6 additions and 6 deletions

View File

@ -1,9 +1,10 @@
CC=gcc CC=gcc
CFLAGS=-Wall CFLAGS=-Wall
PICRIN_LIB=libpicrin.so
ifeq ($(findstring CYGWIN,$(shell uname -s)), CYGWIN) ifeq ($(findstring CYGWIN,$(shell uname -s)), CYGWIN)
PICRIN_LIB=cygpicrin.dll PICRIN_LIB=cygpicrin.dll
else
PICRIN_LIB=libpicrin.so
endif endif
all: debug-build run all: debug-build run
@ -17,8 +18,7 @@ debug-build: build
build: build-lib build-main build: build-lib build-main
build-main: build-main:
$(CC) $(CFLAGS) tools/main.c -o bin/picrin -I./include -L./lib -lpicrin -lreadline $(CC) $(CFLAGS) tools/main.c src/*.c -o bin/picrin -I./include -I./extlib -lreadline -lm
cp lib/$(PICRIN_LIB) bin/
build-lib: build-lib:
cd src; \ cd src; \
@ -28,11 +28,11 @@ build-lib:
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/$(PICRIN_LIB) bin/$(PICRIN_LIB) rm -f lib/$(PICRIN_LIB)
rm -f bin/picrin rm -f bin/picrin
run: run:
bin/picrin bin/picrin
tak: build tak: release
bin/picrin etc/tak.scm bin/picrin etc/tak.scm