mirror of
https://github.com/Zygo/bees.git
synced 2025-06-16 01:26:18 +02:00
build: make libcrucible a static library
libcrucible at one time in the distant past had to be a shared library to force global C++ object initialization; however, this is no longer required. Make libcrucible static to solve various rpath and soname versioning issues, especially when distros try (unwisely) to package the library separately. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
10
lib/Makefile
10
lib/Makefile
@ -1,7 +1,7 @@
|
||||
TAG ?= $(shell git describe --always --dirty || echo UNKNOWN)
|
||||
|
||||
default: libcrucible.so
|
||||
%.so: Makefile
|
||||
default: libcrucible.a
|
||||
%.a: Makefile
|
||||
|
||||
CRUCIBLE_OBJS = \
|
||||
chatter.o \
|
||||
@ -44,7 +44,7 @@ depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep)
|
||||
include depends.mk
|
||||
|
||||
%.o: %.cc ../makeflags
|
||||
$(CXX) $(BEES_CXXFLAGS) -fPIC -o $@ -c $<
|
||||
$(CXX) $(BEES_CXXFLAGS) -o $@ -c $<
|
||||
|
||||
libcrucible.so: $(CRUCIBLE_OBJS) .version.o
|
||||
$(CXX) $(BEES_LDFLAGS) -fPIC -shared -Wl,-soname,$@ -o $@ $^ -luuid
|
||||
libcrucible.a: $(CRUCIBLE_OBJS) .version.o
|
||||
$(AR) rcs $@ $^
|
||||
|
Reference in New Issue
Block a user