mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-22 19:30:36 +00:00
enable powerpc universal interfaces via nix
This commit is contained in:
parent
fdc7063870
commit
7f8f47ca66
@ -259,6 +259,7 @@ function setup68KLibraries()
|
||||
|
||||
function setupPPCLibraries()
|
||||
{
|
||||
DEST=${1:-"$PREFIX/universal"}
|
||||
mkdir -p "$DEST/libppc"
|
||||
case `ResInfo -n "$INTERFACELIB" 2> /dev/null || echo 0` in
|
||||
0)
|
||||
@ -273,7 +274,7 @@ function setupPPCLibraries()
|
||||
echo "Building PowerPC import libraries..."
|
||||
for shlib in "${SHAREDLIBRARIES}/"*; do
|
||||
libname=`basename "$shlib"`
|
||||
implib=lib${libname}.a
|
||||
implib=lib${libname%.bin}.a
|
||||
printf " %30s => %-30s\n" ${libname} ${implib}
|
||||
MakeImport "$shlib" "$DEST/libppc/$implib" || true
|
||||
done
|
||||
@ -288,7 +289,7 @@ function setupPPCLibraries()
|
||||
cp "$obj" "$DEST/libppc/"
|
||||
basename=`basename "${obj%.o}"`
|
||||
# and wrap it in a .a archive for convenience
|
||||
lib="$PREFIX"/universal/libppc/lib$basename.a
|
||||
lib="$DEST"/libppc/lib$basename.a
|
||||
rm -f "$lib"
|
||||
powerpc-apple-macos-ar cqs "$lib" "$obj"
|
||||
fi
|
||||
|
@ -26,20 +26,31 @@ pkgs: prevPkgs:
|
||||
ConvertDiskImage $src decoded.dsk
|
||||
export HOME=.
|
||||
hmount decoded.dsk
|
||||
mkdir -p CIncludes RIncludes lib68
|
||||
mkdir -p CIncludes RIncludes
|
||||
hcopy -t 'MPW-GM:MPW-GM:Interfaces&Libraries:Interfaces:CIncludes:*.h' CIncludes/
|
||||
hcopy -t 'MPW-GM:MPW-GM:Interfaces&Libraries:Interfaces:RIncludes:*.r' RIncludes/
|
||||
mkdir -p $out/include $out/RIncludes
|
||||
bash ${../prepare-headers.sh} CIncludes $out/include
|
||||
bash ${../prepare-rincludes.sh} RIncludes $out/RIncludes
|
||||
|
||||
hcopy -r 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:Libraries:*.o' lib68
|
||||
|
||||
. ${../interfaces-and-libraries.sh}
|
||||
'' + (pkgs.lib.optionalString (pkgs.targetPlatform.cmakeSystemName == "Retro68") ''
|
||||
mkdir -p lib68
|
||||
hcopy -r 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:Libraries:*.o' lib68
|
||||
M68KLIBRARIES=lib68
|
||||
setup68KLibraries $out/
|
||||
mv $out/lib68k $out/lib
|
||||
'';
|
||||
'') + (pkgs.lib.optionalString (pkgs.targetPlatform.cmakeSystemName != "Retro68") ''
|
||||
mkdir -p libppc peflibs
|
||||
hcopy -r 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:PPCLibraries:*.o' libppc
|
||||
hcopy -m 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:SharedLibraries:*' peflibs
|
||||
PPCLIBRARIES=libppc
|
||||
SHAREDLIBRARIES=peflibs
|
||||
INTERFACELIB=peflibs/InterfaceLib.bin
|
||||
|
||||
setupPPCLibraries $out/
|
||||
mv $out/libppc $out/lib
|
||||
'');
|
||||
};
|
||||
});
|
||||
} // prevPkgs.lib.optionalAttrs (prevPkgs.targetPlatform ? retro68) {
|
||||
|
Loading…
Reference in New Issue
Block a user