thin-provisioning-tools/contrib/Makefile.in
Thanos Makatos 088d5ac05e compile 3rd party emitters into static lib before creating shared lib
This patch adds an additional step in the compilation of 3rd party emitters:
we first create the static library and then create the shared library. This
is necessary in order to build the emitters into the static binary, which is
implemented in a subsequent patch.
2016-04-06 15:56:08 +03:00

25 lines
477 B
Makefile

PLUGIN_LIBS= \
contrib/thin_sexp_emitter.a \
contrib/tmakatos_emitter.a \
contrib/ewheeler_emitter.a
PLUGINS=\
contrib/thin_sexp_emitter.so \
contrib/tmakatos_emitter.so \
contrib/ewheeler_emitter.so
contrib: $(PLUGINS) $(PLUGIN_LIBS)
contrib/%.o: contrib/%.cc
$(V)echo " [CC] $@"
$(V)$(CC) $^ -o $@
contrib/%.a: contrib/%.o
$(V)echo " [AR] $@"
$(V)ar rcs $@ $^
contrib/%.so: contrib/%.a
$(V)echo " [LD] $@"
$(V)$(CC) -shared -Wl,-soname,$@ -o $@ $<