1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-18 13:55:44 +02:00
bees/lib/Makefile
Kai Krakow 634a1d0bf6 Installation: -fPIC should not be used unconditionally
According to Gentoo packaging guide, -fPIC should only be used on shared
libraries, and not added unconditionally to every linker call.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-01-11 02:30:12 +01:00

37 lines
770 B
Makefile

TAG := $(shell git describe --always --dirty || echo UNKNOWN)
default: libcrucible.so
OBJS = \
crc64.o \
chatter.o \
error.o \
extentwalker.o \
fd.o \
fs.o \
ntoa.o \
path.o \
process.o \
string.o \
time.o \
uuid.o \
.version.o \
include ../makeflags
depends.mk: *.cc
for x in *.cc; do $(CXX) $(CXXFLAGS) -M "$$x"; done >> depends.mk.new
mv -fv depends.mk.new depends.mk
.version.cc: Makefile ../makeflags *.cc ../include/crucible/*.h
echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > .version.new.cc
mv -f .version.new.cc .version.cc
-include depends.mk
%.o: %.cc ../include/crucible/%.h
$(CXX) $(CXXFLAGS) -fPIC -o $@ -c $<
libcrucible.so: $(OBJS) Makefile
$(CXX) $(LDFLAGS) -fPIC -o $@ $(OBJS) -shared -Wl,-soname,$@ -luuid