Add support for LD_LIBS for shared objects

This commit is contained in:
spider 1998-06-02 01:48:14 +00:00
parent fc3175c13e
commit 50c4d664a5
4 changed files with 22 additions and 5 deletions

View File

@ -36,6 +36,7 @@ MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
MKDEPENDENCIES = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/depend.mk
GUI_LIBS = -lXm -lXt -lX11
MATH_LIB = -lm
OPT_SLASH = /
LIB_PREFIX = lib
LIB_SUFFIX = a
@ -43,6 +44,9 @@ NSPR_LIBS = nspr21 plds21 plc21 msgc21 nspr21
LINK_PROGRAM = $(CC)
XP_REG_LIB = reg
ARCHIVE_SUFFIX =
NATIVE_PLATFORM = unix
NATIVE_RAPTOR_WIDGET = widgetunix
NATIVE_RAPTOR_GFX = gfxunix
####################################################################
#

View File

@ -47,6 +47,9 @@ LIB_SUFFIX = lib
DLL_SUFFIX = dll
OUT_NAME = -out:
ARCHIVE_SUFFIX = _s
NATIVE_PLATFORM=win
NATIVE_RAPTOR_WIDGET =
NATIVE_RAPTOR_GFX =
ifdef RCFILE
RCFILE := $(RCFILE).rc
@ -54,6 +57,7 @@ RESFILE = $(OBJDIR)/$(RCFILE:.rc=.res)
endif
OS_LIBS = gdi32.lib kernel32.lib advapi32.lib user32.lib
MATH_LIB=
GUI_LIBS =
NSPR_LIBS = libplds21 libplc21 libnspr21 libmsgc21

View File

@ -233,10 +233,10 @@ ifeq ($(OS_TARGET),WIN16)
$(LINK) @w16link.
rm w16link
else
$(LINK_EXE) $(MAP) $(PDB) $(IMP) $(OBJS) $(OUT_NAME)$(PROGRAM) $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(RESFILE)
$(LINK_EXE) $(MAP) $(PDB) $(IMP) $(OBJS) $(OUT_NAME)$(PROGRAM) $(LDFLAGS) $(OS_LIBS) $(LD_LIBS) $(EXTRA_LIBS) $(RESFILE)
endif
else
$(LINK_PROGRAM) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(OS_LIBS)
$(LINK_PROGRAM) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(LD_LIBS) $(OS_LIBS)
endif
$(LIBRARY): $(OBJS) $(AR_LIBS)
@ -284,9 +284,9 @@ ifeq ($(OS_TARGET), WIN16)
rm w16link
else
ifdef AR_LIBS
$(LINK_DLL) -MAP $(DLLBASE) $(AR_LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS) $(LDFLAGS) @$(OBJDIR)\\$(LIBRARY_NAME).lst
$(LINK_DLL) -MAP $(DLLBASE) $(AR_LIBS) $(OS_LIBS) $(LD_LIBS) $(EXTRA_LIBS) $(OBJS) $(LDFLAGS) @$(OBJDIR)\\$(LIBRARY_NAME).lst
else
$(LINK_DLL) -MAP $(DLLBASE) $(AR_LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS) $(LDFLAGS)
$(LINK_DLL) -MAP $(DLLBASE) $(AR_LIBS) $(OS_LIBS) $(LD_LIBS) $(EXTRA_LIBS) $(OBJS) $(LDFLAGS)
endif
endif
else

View File

@ -160,7 +160,7 @@ ifdef EXTRA_LIBS
EXTRA_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH)$(LIB_PREFIX), $(EXTRA_LIBS:%=%$(STATIC_LIB_SUFFIX)))
endif
# Rules to convert EXTRA_LIBS to platform-dependent naming scheme
# Rules to convert AR_LIBS to platform-dependent naming scheme
ifdef AR_LIBS
ifeq ($(OS_ARCH), WINNT)
AR_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH), $(AR_LIBS:%=%$(LIBRARY_VERSION)$(ARCHIVE_SUFFIX)$(STATIC_LIB_SUFFIX)))
@ -169,6 +169,15 @@ ifdef AR_LIBS
endif
endif
# Rules to convert LD_LIBS to platform-dependent naming scheme
ifdef LD_LIBS
ifeq ($(OS_ARCH), WINNT)
LD_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH), $(LD_LIBS:%=%$(STATIC_LIB_SUFFIX)))
else
LD_LIBS := $(addprefix $(CONFIG_DIST_BIN)$(OPT_SLASH)lib, $(LD_LIBS:%=%$(STATIC_LIB_SUFFIX)))
endif
endif
ifdef LIBRARY
# LIBRARY := $(addprefix $(OBJDIR)/, $(LIBRARY))
ifndef ARCHIVE_ONLY