# $(MAJOR) - The major version number of this library
# $(MINOR) - The minor version number of this library
# $(MAJOR) - The major version number of this library
# $(MINOR) - The minor version number of this library
$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
$(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
$(LOCAL)-SONAME := lib$(LIBRARY).so.$(MAJOR)
$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
$(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
$(LOCAL)-SONAME := lib$(LIBRARY).so.$(MAJOR)
# Install the command hooks
headers: $($(LOCAL)-HEADERS)
library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY).so.$(MAJOR)
clean: clean/$(LOCAL)
veryclean: veryclean/$(LOCAL)
# Install the command hooks
headers: $($(LOCAL)-HEADERS)
library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY).so.$(MAJOR)
clean: clean/$(LOCAL)
veryclean: veryclean/$(LOCAL)
-$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
- -rm -f lib$($(@F)-LIBRARY).so* 2> /dev/null
+$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS) $($(LOCAL)-VERSIONSCRIPT)
+ -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) -o $@ \
- -Wl,-soname -Wl,$($(@F)-SONAME) -shared $(filter %.opic,$^) \
- $($(@F)-SLIBS)
+ $(CXX) $(CXXSTD) $(CXXFLAGS) $(LDFLAGS) -Wl,--version-script=$($(@F)-VERSIONSCRIPT) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
+ -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
+ $(filter %.opic,$^) \
+ $($(@F)-SLIBS)
$(DoDep)
# Include the dependencies that are available
The_DFiles = $(wildcard $($(LOCAL)-DEP))
ifneq ($(words $(The_DFiles)),0)
include $(The_DFiles)
$(DoDep)
# Include the dependencies that are available
The_DFiles = $(wildcard $($(LOCAL)-DEP))
ifneq ($(words $(The_DFiles)),0)
include $(The_DFiles)