Link against import libraries of DLLs when building DLLs.
Enforce 8.3 names for wxWindows DLLs - make install is going to need fixing... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,7 +86,7 @@ CleanUp() {
|
|||||||
# Kill result in case of failure as there is just to many stupid make/nmake
|
# Kill result in case of failure as there is just to many stupid make/nmake
|
||||||
# things out there which doesn't do this.
|
# things out there which doesn't do this.
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
rm -f "${outFile}.a" "${outFile}.def" "${outFile}.dll"
|
rm -f $arcFile $defFile $dllFile
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,6 +165,7 @@ case $curDirS in
|
|||||||
esac
|
esac
|
||||||
# Parse commandline
|
# Parse commandline
|
||||||
libsToLink=0
|
libsToLink=0
|
||||||
|
omfLinking=0
|
||||||
while [ $1 ]; do
|
while [ $1 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-ord*)
|
-ord*)
|
||||||
@@ -203,16 +204,27 @@ while [ $1 ]; do
|
|||||||
-nolxl*)
|
-nolxl*)
|
||||||
flag_USE_LXLITE=0
|
flag_USE_LXLITE=0
|
||||||
;;
|
;;
|
||||||
-* | /* | *.dll)
|
-* | /*)
|
||||||
case $1 in
|
case $1 in
|
||||||
-L* | -l*)
|
-L* | -l*)
|
||||||
libsToLink=1
|
libsToLink=1
|
||||||
;;
|
;;
|
||||||
|
-Zomf)
|
||||||
|
omfLinking=1
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
EXTRA_CFLAGS=${EXTRA_CFLAGS}" "$1
|
EXTRA_CFLAGS=${EXTRA_CFLAGS}" "$1
|
||||||
;;
|
;;
|
||||||
|
*.dll)
|
||||||
|
EXTRA_CFLAGS="${EXTRA_CFLAGS} `basnam $1 .dll`"
|
||||||
|
if [ $omfLinking -eq 1 ]; then
|
||||||
|
EXTRA_CFLAGS="${EXTRA_CFLAGS}.lib"
|
||||||
|
else
|
||||||
|
EXTRA_CFLAGS="${EXTRA_CFLAGS}.a"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
found=0;
|
found=0;
|
||||||
if [ $libsToLink -ne 0 ]; then
|
if [ $libsToLink -ne 0 ]; then
|
||||||
@@ -327,9 +339,23 @@ case $outFile in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
defFile="${outFile}.def"
|
defFile="${outFile}.def"
|
||||||
dllFile="${outFile}.dll"
|
|
||||||
arcFile="${outFile}.a"
|
arcFile="${outFile}.a"
|
||||||
|
|
||||||
|
#create $dllFile as something matching 8.3 restrictions,
|
||||||
|
dllFile="$outFile"
|
||||||
|
case $dllFile in
|
||||||
|
*wx_base_*)
|
||||||
|
dllFile=`echo $dllFile | sed 's/base_\(...\)/b\1/'`
|
||||||
|
;;
|
||||||
|
*wx_*_*)
|
||||||
|
dllFile=`echo $dllFile | sed 's/_\(..\)[^_]*_\(..\)[^-]*-/\1\2/'`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
dllFile="`echo $dllFile | sed 's/\.//' | sed 's/_//' | sed 's/-//'`"
|
||||||
|
|
||||||
|
|
||||||
if [ $do_backup -ne 0 -a -f $arcFile ] ; then
|
if [ $do_backup -ne 0 -a -f $arcFile ] ; then
|
||||||
doCommand "mv $arcFile ${outFile}_s.a"
|
doCommand "mv $arcFile ${outFile}_s.a"
|
||||||
fi
|
fi
|
||||||
@@ -349,8 +375,8 @@ done
|
|||||||
|
|
||||||
# Create the def file.
|
# Create the def file.
|
||||||
rm -f $defFile
|
rm -f $defFile
|
||||||
libName=`basnam $outFile`
|
echo "LIBRARY `basnam $dllFile` $library_flags" >> $defFile
|
||||||
echo "LIBRARY `echo $libName | sed 's/\./_/'` $library_flags" >> $defFile
|
dllFile="$dllFile.dll"
|
||||||
if [ -n $description ]; then
|
if [ -n $description ]; then
|
||||||
echo "DESCRIPTION \"${description}\"" >> $defFile
|
echo "DESCRIPTION \"${description}\"" >> $defFile
|
||||||
fi
|
fi
|
||||||
@@ -393,6 +419,7 @@ for file in $inputFiles ; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
doCommand "$CC $CFLAGS -Zdll -o $dllFile $defFile $gccCmdl $EXTRA_CFLAGS"
|
doCommand "$CC $CFLAGS -Zdll -o $dllFile $defFile $gccCmdl $EXTRA_CFLAGS"
|
||||||
|
touch "${outFile}.dll"
|
||||||
|
|
||||||
doCommand "emximp -o $arcFile $defFile"
|
doCommand "emximp -o $arcFile $defFile"
|
||||||
if [ $flag_USE_LXLITE -ne 0 ]; then
|
if [ $flag_USE_LXLITE -ne 0 ]; then
|
||||||
@@ -402,6 +429,7 @@ if [ $flag_USE_LXLITE -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
doCommand "lxlite -cs -t: -mrn -mln $add_flags $dllFile"
|
doCommand "lxlite -cs -t: -mrn -mln $add_flags $dllFile"
|
||||||
fi
|
fi
|
||||||
|
doCommand "emxomf -s -l $arcFile"
|
||||||
|
|
||||||
# Successful exit.
|
# Successful exit.
|
||||||
CleanUp 1
|
CleanUp 1
|
||||||
|
Reference in New Issue
Block a user