Commit 5bba00ad authored by Diederik van Arkel's avatar Diederik van Arkel

processor dependant paths

parent e48f58ca
......@@ -36,8 +36,11 @@ MakeABCPathname name = RemoveSuffix name +++ ".abc";
MakeObjPathname :: !Processor !String -> Pathname;
MakeObjPathname processor name
= RemoveSuffix name +++ ProcessorSuffix processor
/*
| processor == CurrentProcessor
= RemoveSuffix name +++ ".o";
// = RemoveSuffix name +++ ".o";
= RemoveSuffix name +++ ".xo";
| processor == MC68000
= RemoveSuffix name +++ ".obj0";
| processor == MC68020
......@@ -45,7 +48,7 @@ MakeObjPathname processor name
| processor == MC68020_and_68881
= RemoveSuffix name +++ ".obj2";
= abort ("MakeObjPathname: " +++ toString processor +++ " : No such processor ");
*/
MakeProjectPathname :: !String -> Pathname;
MakeProjectPathname name = RemoveSuffix name +++ ".prj";
......@@ -83,8 +86,11 @@ where
MakeObjSystemPathname :: !Processor !Pathname -> Pathname
MakeObjSystemPathname processor name
= files_and_path (ProcessorSuffix processor)
/*
| processor == CurrentProcessor
= files_and_path ".o";
// = files_and_path ".o";
= files_and_path ".xo";
| processor == MC68000
= files_and_path ".obj0";
| processor == MC68020
......@@ -92,6 +98,7 @@ MakeObjSystemPathname processor name
| processor == MC68020_and_68881
= files_and_path ".obj2";
= abort ("MakeObjSystemPathname: " +++ toString processor +++ " : No such processor ");
*/
where
files_and_path extension = directory_name_plus_system_dir +++ sep +++ file+++extension
directory_name_plus_system_dir
......
......@@ -10,8 +10,9 @@ import UtilDate
:: Modulename :== String
:: Processor = CurrentProcessor | MC68000 | MC68020 | MC68020_and_68881
:: Processor //= CurrentProcessor | MC68000 | MC68020 | MC68020_and_68881
ProcessorSuffix :: !Processor -> String
instance == Processor
instance toString Processor
instance fromString Processor
......
......@@ -8,7 +8,7 @@ from UtilNewlinesFile import :: NewlineConvention(..)
import PmCompilerOptions
from StdPathname import :: Pathname
import StdFile
import Platform
:: Modulename :== String
......@@ -32,47 +32,65 @@ UnexpectedConstructor typeName string defaultValue
//--
:: Processor = CurrentProcessor | MC68000 | MC68020 | MC68020_and_68881
:: Processor
= CurrentProcessor
| MC68000
| MC68020
| MC68020_and_68881
| PowerPC_Classic
| PowerPC_Carbon
| PowerPC_MachO
| I386
DefaultProcessor :== PlatformDependant I386 PowerPC_Carbon
ProcessorSuffix :: !Processor -> String
ProcessorSuffix CurrentProcessor = ProcessorSuffix DefaultProcessor
ProcessorSuffix MC68000 = ".obj0"
ProcessorSuffix MC68020 = ".obj1"
ProcessorSuffix MC68020_and_68881 = ".obj2"
ProcessorSuffix PowerPC_Classic = ".cxo"
ProcessorSuffix PowerPC_Carbon = ".xo"
ProcessorSuffix PowerPC_MachO = ".o"
ProcessorSuffix I386 = ".o"
instance == Processor
where
(==) :: Processor Processor -> Bool
(==) CurrentProcessor CurrentProcessor
= True
(==) MC68000 MC68000
= True
(==) MC68020 MC68020
= True
(==) MC68020_and_68881 MC68020_and_68881
= True
(==) _ _
= False
(==) CurrentProcessor CurrentProcessor = True
(==) MC68000 MC68000 = True
(==) MC68020 MC68020 = True
(==) MC68020_and_68881 MC68020_and_68881 = True
(==) PowerPC_Classic PowerPC_Classic = True
(==) PowerPC_Carbon PowerPC_Carbon = True
(==) PowerPC_MachO PowerPC_MachO = True
(==) I386 I386 = True
(==) _ _ = False
instance fromString Processor
where
fromString :: {#Char} -> Processor
fromString "CurrentProcessor"
= CurrentProcessor
fromString "MC68000"
= MC68000
fromString "MC68020"
= MC68020
fromString "MC68020_and_68881"
= MC68020_and_68881
fromString string
= UnexpectedConstructor "Processor" string CurrentProcessor
fromString "CurrentProcessor" = CurrentProcessor
fromString "MC68000" = MC68000
fromString "MC68020" = MC68020
fromString "MC68020_and_68881" = MC68020_and_68881
fromString "PowerPC_Classic" = PowerPC_Classic
fromString "PowerPC_Carbon" = PowerPC_Carbon
fromString "PowerPC_MachO" = PowerPC_MachO
fromString "I386" = I386
fromString string = UnexpectedConstructor "Processor" string CurrentProcessor
instance toString Processor
where
toString :: Processor -> {#Char}
toString MC68000
= "MC68000"
toString MC68020
= "MC68020"
toString MC68020_and_68881
= "MC68020_and_68881"
toString CurrentProcessor
= "CurrentProcessor"
toString MC68000 = "MC68000"
toString MC68020 = "MC68020"
toString MC68020_and_68881 = "MC68020_and_68881"
toString PowerPC_Classic = "PowerPC_Classic"
toString PowerPC_Carbon = "PowerPC_Carbon"
toString PowerPC_MachO = "PowerPC_MachO"
toString I386 = "I386"
toString CurrentProcessor = "CurrentProcessor"
:: ModInfoAndName =
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment