|
@@ -5,7 +5,7 @@
|
|
|
# Input
|
|
# Input
|
|
|
# $(SOURCE) - The source code to use
|
|
# $(SOURCE) - The source code to use
|
|
|
# $(HEADERS) - Exported header files and private header files
|
|
# $(HEADERS) - Exported header files and private header files
|
|
|
-# $(LIBRARY) - The name of the library without lib or .so
|
|
|
|
|
|
|
+# $(LIBRARY) - The name of the library without lib or .so
|
|
|
# $(MAJOR) - The major version number of this library
|
|
# $(MAJOR) - The major version number of this library
|
|
|
# $(MINOR) - The minor version number of this library
|
|
# $(MINOR) - The minor version number of this library
|
|
|
# $(APT_DOMAIN) - The text domain for this library
|
|
# $(APT_DOMAIN) - The text domain for this library
|
|
@@ -16,11 +16,11 @@
|
|
|
# See defaults.mak for information about LOCAL
|
|
# See defaults.mak for information about LOCAL
|
|
|
|
|
|
|
|
# Some local definitions
|
|
# Some local definitions
|
|
|
-LOCAL := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
|
|
|
|
|
|
|
+LOCAL := lib$(LIBRARY).so.$(MAJOR).$(MINOR)
|
|
|
$(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE)))))
|
|
$(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE)))))
|
|
|
$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
|
|
$(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
|
|
|
$(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
|
|
$(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
|
|
|
-$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
|
|
|
|
|
|
|
+$(LOCAL)-SONAME := lib$(LIBRARY).so.$(MAJOR)
|
|
|
$(LOCAL)-SLIBS := $(SLIBS)
|
|
$(LOCAL)-SLIBS := $(SLIBS)
|
|
|
$(LOCAL)-LIBRARY := $(LIBRARY)
|
|
$(LOCAL)-LIBRARY := $(LIBRARY)
|
|
|
|
|
|
|
@@ -29,7 +29,7 @@ include $(PODOMAIN_H)
|
|
|
|
|
|
|
|
# Install the command hooks
|
|
# Install the command hooks
|
|
|
headers: $($(LOCAL)-HEADERS)
|
|
headers: $($(LOCAL)-HEADERS)
|
|
|
-library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
|
|
|
|
|
|
|
+library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY).so.$(MAJOR)
|
|
|
clean: clean/$(LOCAL)
|
|
clean: clean/$(LOCAL)
|
|
|
veryclean: veryclean/$(LOCAL)
|
|
veryclean: veryclean/$(LOCAL)
|
|
|
|
|
|
|
@@ -44,14 +44,14 @@ veryclean/$(LOCAL): clean/$(LOCAL)
|
|
|
-rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so*
|
|
-rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so*
|
|
|
|
|
|
|
|
# Build rules for the two symlinks
|
|
# Build rules for the two symlinks
|
|
|
-.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so
|
|
|
|
|
-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
|
|
|
|
|
|
|
+.PHONY: $(LIB)/lib$(LIBRARY).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so
|
|
|
|
|
+$(LIB)/lib$(LIBRARY).so.$(MAJOR): $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR)
|
|
|
ln -sf $(<F) $@
|
|
ln -sf $(<F) $@
|
|
|
-$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
|
|
|
|
|
|
|
+$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR)
|
|
|
ln -sf $(<F) $@
|
|
ln -sf $(<F) $@
|
|
|
|
|
|
|
|
# The binary build rule
|
|
# The binary build rule
|
|
|
-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
|
|
|
|
|
|
|
+$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
|
|
|
-rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
|
|
-rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
|
|
|
echo Building shared library $@
|
|
echo Building shared library $@
|
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
|