mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 15:40:16 +02:00
+ make shared
git-svn-id: trunk@2227 -
This commit is contained in:
parent
f5e89801da
commit
9c6b3cc8f7
File diff suppressed because it is too large
Load Diff
@ -737,6 +737,7 @@ ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.so
|
||||
SHAREDLIBPREFIX=libfp
|
||||
STATICLIBPREFIX=libp
|
||||
RSTEXT=.rst
|
||||
#DEBUGSYMEXT #for debugger symbol files, define only for targets which has this
|
||||
@ -1620,22 +1621,27 @@ vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
|
||||
|
||||
.PHONY: fpc_shared
|
||||
|
||||
ifndef LIB_FULLNAME
|
||||
ifdef LIB_VERSION
|
||||
LIB_FULLNAME=$(LIB_NAME).$(LIB_VERSION)
|
||||
else
|
||||
LIB_FULLNAME=$(LIB_NAME)
|
||||
ifndef SHARED_LIBVERSION
|
||||
SHARED_LIBVERSION=$(FPC_VERSION)
|
||||
endif
|
||||
|
||||
ifndef $(SHARED_LIBNAME)
|
||||
SHARED_LIBNAME=$(PACKAGE_NAME)
|
||||
endif
|
||||
|
||||
ifndef LIB_FULLNAME
|
||||
SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)
|
||||
endif
|
||||
|
||||
# Default sharedlib units are all unit objects
|
||||
ifndef LIB_SHAREDUNITS
|
||||
LIB_SHAREDUNITS:=$(TARGET_UNITS)
|
||||
ifndef SHARED_LIBUNITS
|
||||
SHARED_LIBUNITS:=$(TARGET_UNITS)
|
||||
endif
|
||||
|
||||
fpc_shared: all
|
||||
fpc_shared:
|
||||
ifdef HASSHAREDLIB
|
||||
$(PPUMOVE) $(LIB_SHAREDUNITS) -o$(LIB_FULLNAME)
|
||||
$(MAKE) all $(SHAREDOPTS)
|
||||
$(PPUMOVE) $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME)
|
||||
else
|
||||
@$(ECHO) Shared Libraries not supported
|
||||
endif
|
||||
|
@ -641,7 +641,9 @@ implementation
|
||||
FHasSection[sec_zipinstall]:=false;
|
||||
FHasSection[sec_distinstall]:=false;
|
||||
end;
|
||||
FHasSection[sec_libs]:=FInput.HasVariable('lib_name');
|
||||
{ can't get shared lib generation working without it (FK)
|
||||
FHasSection[sec_libs]:=FInput.HasVariable('lib_name');
|
||||
}
|
||||
{ Remove unused sections for targets }
|
||||
SkippedSecs:=0;
|
||||
if (not FInput.HasTargetVariable('target_units')) then
|
||||
@ -779,6 +781,10 @@ implementation
|
||||
AddTargetVariable('compiler_librarydir');
|
||||
AddTargetVariable('compiler_targetdir');
|
||||
AddTargetVariable('compiler_unittargetdir');
|
||||
{ shared }
|
||||
AddTargetVariable('shared_libname');
|
||||
AddTargetVariable('shared_libversion');
|
||||
AddTargetVariable('shared_libunits');
|
||||
{ default Dirs and extensions }
|
||||
AddIniSection('defaultdirs');
|
||||
if FInput.CheckLibcRequire then
|
||||
@ -808,7 +814,7 @@ implementation
|
||||
if FHasSection[sec_compile] then
|
||||
AddIniSection('compilerules');
|
||||
if FHasSection[sec_libs] then
|
||||
AddIniSection('libraryrules');
|
||||
AddIniSection('libraryrules');
|
||||
{ install }
|
||||
if FHasSection[sec_install] then
|
||||
AddIniSection('installrules');
|
||||
|
Loading…
Reference in New Issue
Block a user