libbenz.a -> libbenz.so

This commit is contained in:
Yuichi Nishiwaki 2016-02-21 21:23:45 +09:00
parent f61fc19692
commit 81dd765d8d
1 changed files with 9 additions and 7 deletions

View File

@ -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)