From 81dd765d8d5b128cbf09fe8ee38923fcd07b23d8 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 21 Feb 2016 21:23:45 +0900 Subject: [PATCH] libbenz.a -> libbenz.so --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 58eadf39..05bf5079 100644 --- a/Makefile +++ b/Makefile @@ -33,8 +33,8 @@ debug: bin/picrin include $(sort $(wildcard contrib/*/nitro.mk)) -bin/picrin: $(PICRIN_OBJS) $(CONTRIB_OBJS) lib/libbenz.a - $(CC) $(CFLAGS) -o $@ $(PICRIN_OBJS) $(CONTRIB_OBJS) lib/libbenz.a $(LDFLAGS) +bin/picrin: $(PICRIN_OBJS) $(CONTRIB_OBJS) lib/libbenz.so + $(CC) $(CFLAGS) -o $@ $(PICRIN_OBJS) $(CONTRIB_OBJS) lib/libbenz.so $(LDFLAGS) src/load_piclib.c: $(CONTRIB_LIBS) perl etc/mkloader.pl $(CONTRIB_LIBS) > $@ @@ -42,8 +42,8 @@ src/load_piclib.c: $(CONTRIB_LIBS) src/init_contrib.c: perl etc/mkinit.pl $(CONTRIB_INITS) > $@ -lib/libbenz.a: $(BENZ_OBJS) - $(AR) $(ARFLAGS) $@ $(BENZ_OBJS) +lib/libbenz.so: $(BENZ_OBJS) + $(CC) -shared $(CFLAGS) -o $@ $(BENZ_OBJS) $(LDFLAGS) extlib/benz/boot.o: extlib/benz/boot.c cd extlib/benz; perl boot.c @@ -70,8 +70,10 @@ test: test-contribs test-nostdlib test-issue test-contribs: bin/picrin $(CONTRIB_TESTS) test-nostdlib: - $(CC) -I extlib/benz/include -D'PIC_ENABLE_LIBC=0' -D'PIC_ENABLE_FLOAT=0' -D'PIC_ENABLE_STDIO=0' -ffreestanding -nostdlib -fPIC -shared -std=c89 -pedantic -Wall -Wextra -Werror -o lib/libbenz.so $(BENZ_SRCS) etc/libc_polyfill.c -fno-stack-protector - rm -f lib/libbenz.so + $(CC) -I extlib/benz/include -D'PIC_ENABLE_LIBC=0' -D'PIC_ENABLE_STDIO=0' -ffreestanding -nostdlib -Os -fPIC -shared -std=c89 -pedantic -Wall -Wextra -Werror -o lib/libbenz-tiny.so $(BENZ_SRCS) etc/libc_polyfill.c -fno-stack-protector + strip lib/libbenz-tiny.so + ls -lh lib/libbenz-tiny.so + rm -f lib/libbenz-tiny.so test-issue: test-picrin-issue test-repl-issue @@ -90,7 +92,7 @@ install: all clean: rm -f src/load_piclib.c src/init_contrib.c - rm -f lib/libbenz.a + rm -f lib/libbenz.so rm -f $(BENZ_OBJS) rm -f $(PICRIN_OBJS) rm -f $(CONTRIB_OBJS)