зеркало из https://github.com/mozilla/gecko-dev.git
Allow shared libraries to be created based on several archive libraries
This commit is contained in:
Родитель
b49f293596
Коммит
fc696d88ff
|
@ -82,12 +82,15 @@ private_export::
|
|||
release_export::
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
libs::
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
libs program install:: $(TARGETS)
|
||||
ifdef LIBRARY
|
||||
$(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR)
|
||||
endif
|
||||
ifdef SHARED_LIBRARY
|
||||
$(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR)
|
||||
$(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_BIN_DIR)
|
||||
endif
|
||||
ifdef IMPORT_LIBRARY
|
||||
$(INSTALL) -m 775 $(IMPORT_LIBRARY) $(SOURCE_LIB_DIR)
|
||||
|
@ -98,7 +101,6 @@ endif
|
|||
ifdef PROGRAMS
|
||||
$(INSTALL) -m 775 $(PROGRAMS) $(SOURCE_BIN_DIR)
|
||||
endif
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
tests::
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
@ -229,10 +231,13 @@ else
|
|||
$(LINK_PROGRAM) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
endif
|
||||
|
||||
$(LIBRARY): $(OBJS)
|
||||
$(LIBRARY): $(OBJS) $(AR_LIBS)
|
||||
@$(MAKE_OBJDIR)
|
||||
rm -f $@
|
||||
$(AR) $(OBJS)
|
||||
$(AR) $(OBJS) $(AR_LIBS)
|
||||
ifdef AR_LIBS
|
||||
+$(EXTRACT_OBJS)
|
||||
endif
|
||||
$(RANLIB) $@
|
||||
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
|
@ -240,9 +245,10 @@ $(IMPORT_LIBRARY): $(SHARED_LIBRARY)
|
|||
wlib +$(SHARED_LIBRARY)
|
||||
endif
|
||||
|
||||
$(SHARED_LIBRARY): $(OBJS)
|
||||
$(SHARED_LIBRARY): $(OBJS) $(AR_LIBS)
|
||||
@$(MAKE_OBJDIR)
|
||||
rm -f $@
|
||||
+$(AR_OBJS)
|
||||
ifeq ($(OS_ARCH), AIX)
|
||||
echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
|
||||
nm -B -C -g $(OBJS) \
|
||||
|
@ -267,7 +273,11 @@ ifeq ($(OS_TARGET), WIN16)
|
|||
$(LINK) @w16link.
|
||||
rm w16link
|
||||
else
|
||||
$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS) $(LDFLAGS)
|
||||
ifdef AR_LIBS
|
||||
$(LINK_DLL) -MAP $(DLLBASE) $(AR_LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS) $(LDFLAGS) @$(OBJDIR)\\$(LIBRARY_NAME).lst
|
||||
else
|
||||
$(LINK_DLL) -MAP $(DLLBASE) $(AR_LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS) $(LDFLAGS)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
$(MKSHLIB) -o $@ $(OBJS) $(LD_LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
||||
|
|
|
@ -150,11 +150,18 @@ ifdef EXTRA_LIBS
|
|||
EXTRA_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH)$(LIB_PREFIX), $(EXTRA_LIBS:%=%$(LIB_SUFFIX)))
|
||||
endif
|
||||
|
||||
# Rules to convert EXTRA_LIBS to platform-dependent naming scheme
|
||||
ifdef AR_LIBS
|
||||
AR_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH)$(LIB_PREFIX), $(AR_LIBS:%=%$(LIB_SUFFIX)))
|
||||
endif
|
||||
|
||||
ifdef LIBRARY
|
||||
# LIBRARY := $(addprefix $(OBJDIR)/, $(LIBRARY))
|
||||
ifdef MKSHLIB
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifndef LIBRARY_NAME
|
||||
SHARED_LIBRARY = $(LIBRARY:.lib=.dll)
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_ARCH),HP-UX)
|
||||
SHARED_LIBRARY = $(LIBRARY:.a=.sl)
|
||||
|
@ -288,6 +295,15 @@ ifdef DIRS
|
|||
done
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifdef AR_LIBS
|
||||
EXTRACT_OBJS = \
|
||||
lib /list:$(OBJDIR)\\$(LIBRARY_NAME).lst $(LIBRARY) ; \
|
||||
perl -I$(GDEPTH)/gconfig $(GDEPTH)/gconfig/extract_objs.pl \
|
||||
"LIST=$(OBJDIR)\\$(LIBRARY_NAME).lst" \
|
||||
"LIBRARY=$(LIBRARY)"
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# special stuff for tests rule in rules.mk
|
||||
|
|
Загрузка…
Ссылка в новой задаче