You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.3 KiB
53 lines
2.3 KiB
diff --git a/config/rules/defaults.mak b/config/rules/defaults.mak
|
|
index aca1573..cb3fcba 100644
|
|
--- a/config/rules/defaults.mak
|
|
+++ b/config/rules/defaults.mak
|
|
@@ -69,15 +69,21 @@ ifdef N
|
|
MADE_FROM_ABOVE:=$(N)
|
|
endif
|
|
|
|
+ifneq ($(SHARED),0)
|
|
+ LIBTYPE=so
|
|
+else
|
|
+ LIBTYPE=a
|
|
+endif
|
|
+
|
|
ifndef PROJECT_LIBDEPS
|
|
- PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).a)
|
|
+ PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
|
|
endif
|
|
ifndef PROJECT_LIBS
|
|
PROJECT_LIBS = $(foreach l,$(PROJECT_LIBRARIES),-L$(PROJECT_LIBRARY_DIR_$(l)) -l$(l))
|
|
endif
|
|
|
|
ifndef REQUIRED_LIBDEPS
|
|
- REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).a)
|
|
+ REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
|
|
endif
|
|
ifndef REQUIRED_LIBS
|
|
REQUIRED_LIBS = $(foreach l,$(REQUIRED_LIBRARIES),-L$(REQUIRED_LIBRARY_DIR_$(l)) -l$(l))
|
|
diff --git a/config/rules/library.mak b/config/rules/library.mak
|
|
index 0181988..2038239 100644
|
|
--- a/config/rules/library.mak
|
|
+++ b/config/rules/library.mak
|
|
@@ -103,14 +103,14 @@ endif
|
|
###########################################################################
|
|
|
|
lib%.so : lib%.a
|
|
- @echo Make Shared Library $*
|
|
+ @echo Make Shared Library $(*F)
|
|
@if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi
|
|
@(cd shared_space ; $(AR) x ../$< )
|
|
- @echo Link Shared Library $*
|
|
- if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$*)" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
|
|
- $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs
|
|
+ @echo Link Shared Library $(*F)
|
|
+ if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$(*F))" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
|
|
+ $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$(*F)),$(subst YYY,$(@F).$(PROJECT_LIBRARY_VERSION_$(*F)),$(MAKE_SHARED_LIB))) shared_space/*.o $(PROJECT_LIBRARY_USES_$(*F):%=-L. -l%) $$libs
|
|
@$(RM) -f shared_space/*.o $@
|
|
- @ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@
|
|
+ @ln -s $(@F).$(PROJECT_LIBRARY_VERSION_$(*F)) $@
|
|
|
|
###########################################################################
|
|
## ##
|