12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757 |
- {
- $Id$
- Copyright (C) 1998-2000 by Florian Klaempfl
- This unit contains information about the target systems supported
- (these are not processor specific)
- This progsam is free software; you can redistribute it and/or modify
- iu under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge- MA 02139, USA.
- ****************************************************************************
- }
- unit systems;
- {$i defines.inc}
- interface
- type
- tendian = (endian_little,endian_big);
- ttargetcpu=(no_cpu
- ,i386,m68k,alpha,powerpc
- );
- tprocessors = (no_processor
- ,Class386,ClassP5,ClassP6
- ,MC68000,MC68100,MC68020
- );
- tsection=(sec_none,
- sec_code,sec_data,sec_bss,
- sec_idata2,sec_idata4,sec_idata5,sec_idata6,sec_idata7,sec_edata,
- sec_stab,sec_stabstr
- );
- type
- tasmmode= (asmmode_none
- ,asmmode_i386_direct,asmmode_i386_att,asmmode_i386_intel
- ,asmmode_m68k_mot,asmmode_alpha_direct,asmmode_powerpc_direct
- );
- const
- {$ifdef i386} i386asmmodecnt=3; {$else} i386asmmodecnt=0; {$endif}
- {$ifdef m68k} m68kasmmodecnt=1; {$else} m68kasmmodecnt=0; {$endif}
- {$ifdef alpha} alphaasmmodecnt=1; {$else} alphaasmmodecnt=0; {$endif}
- {$ifdef powerpc} powerpcasmmodecnt=1; {$else} powerpcasmmodecnt=0; {$endif}
- asmmodecnt=i386asmmodecnt+m68kasmmodecnt+Alphaasmmodecnt+powerpcasmmodecnt+1;
- type
- ttarget = (target_none,
- target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
- target_i386_OS2,target_i386_Win32,target_i386_freebsd,
- target_i386_Netware,
- target_m68k_Amiga,target_m68k_Atari,target_m68k_Mac,
- target_m68k_linux,target_m68k_PalmOS,target_alpha_linux,
- target_powerpc_linux,target_powerpc_macos
- );
- ttargetflags = (tf_none,
- tf_supports_stack_checking,tf_need_export,tf_needs_isconsole
- );
- const
- { alias for supported_target field in tasminfo }
- target_any = target_none;
- {$ifdef i386} i386targetcnt=7; {$else} i386targetcnt=0; {$endif}
- {$ifdef m68k} m68ktargetcnt=5; {$else} m68ktargetcnt=0; {$endif}
- {$ifdef alpha} alphatargetcnt=1; {$else} alphatargetcnt=0; {$endif}
- {$ifdef powerpc} powerpctargetcnt=2; {$else} powerpctargetcnt=0; {$endif}
- targetcnt=i386targetcnt+m68ktargetcnt+alphatargetcnt+powerpctargetcnt+1;
- type
- tasm = (as_none
- ,as_i386_as,as_i386_as_aout,as_i386_asw,
- as_i386_nasmcoff,as_i386_nasmwin32,
- as_i386_nasmelf,as_i386_nasmobj,
- as_i386_tasm,as_i386_masm,
- as_i386_dbg,as_i386_coff,as_i386_pecoff,as_i386_elf
- ,as_m68k_as,as_m68k_gas,as_m68k_mit,as_m68k_mot,as_m68k_mpw,
- as_alpha_as,as_powerpc_as,as_powerpc_mpw
- );
- { binary assembler writers, needed to test for -a }
- const
- {$ifdef i386} i386asmcnt=13; {$else} i386asmcnt=0; {$endif}
- {$ifdef m68k} m68kasmcnt=5; {$else} m68kasmcnt=0; {$endif}
- {$ifdef alpha} alphaasmcnt=1; {$else} alphaasmcnt=0; {$endif}
- {$ifdef powerpc} powerpcasmcnt=2; {$else} powerpcasmcnt=0; {$endif}
- asmcnt=i386asmcnt+m68kasmcnt+alphaasmcnt+powerpcasmcnt+1;
- binassem : set of tasm = [
- as_i386_dbg,as_i386_coff,as_i386_pecoff,as_i386_elf
- ];
- type
- tar = (ar_none
- ,ar_i386_ar,ar_i386_arw
- ,ar_m68k_ar,ar_alpha_ar,ar_powerpc_ar
- );
- const
- {$ifdef i386} i386arcnt=2; {$else} i386arcnt=0; {$endif}
- {$ifdef m68k} m68karcnt=1; {$else} m68karcnt=0; {$endif}
- {$ifdef alpha} alphaarcnt=1; {$else} alphaarcnt=0; {$endif}
- {$ifdef powerpc} powerpcarcnt=1; {$else} powerpcarcnt=0; {$endif}
- arcnt=i386arcnt+m68karcnt+alphaarcnt+powerpcarcnt+1;
- type
- tres = (res_none
- ,res_i386_windres,res_m68k_mpw,res_powerpc_mpw, res_i386_emx
- );
- const
- {$ifdef i386} i386rescnt=2; {$else} i386rescnt=0; {$endif}
- {$ifdef m68k} m68krescnt=1; {$else} m68krescnt=0; {$endif}
- {$ifdef alpha} alpharescnt=0; {$else} alpharescnt=0; {$endif}
- {$ifdef powerpc} powerpcrescnt=1; {$else} powerpcrescnt=0; {$endif}
- rescnt=i386rescnt+m68krescnt+alpharescnt+powerpcrescnt+1;
- type
- tos = ( os_none,
- os_i386_GO32V1,os_i386_GO32V2,os_i386_Linux,os_i386_OS2,
- os_i386_Win32,os_i386_freeBSD,os_i386_Netware,
- os_m68k_Amiga,os_m68k_Atari,os_m68k_Mac,os_m68k_Linux,
- os_m68k_PalmOS,os_alpha_linux,os_powerpc_linux,os_powerpc_macos
- );
- const
- i386oscnt=7;
- m68koscnt=5;
- alphaoscnt=1;
- powerpcoscnt=2;
- oscnt=i386oscnt+m68koscnt+alphaoscnt+powerpcoscnt+1;
- type
- tosinfo = packed record
- id : tos;
- name : string[30];
- shortname : string[9];
- sharedlibext : string[10];
- staticlibext,
- sourceext,
- pasext,
- exeext,
- defext,
- scriptext : string[4];
- libprefix : string[3];
- Cprefix : string[2];
- newline : string[2];
- endian : tendian;
- {longint this is a little overkill no ?? but 256 is possible one day }
- stackalignment : word;
- maxCrecordalignment : word;
- size_of_pointer : byte;
- size_of_longint : byte;
- use_bound_instruction : boolean;
- use_function_relative_addresses : boolean;
- end;
- tasminfo = packed record
- id : tasm;
- idtxt : string[9];
- asmbin : string[8];
- asmcmd : string[50];
- supported_target : ttarget;
- allowdirect,
- externals,
- needar : boolean;
- labelprefix : string[2];
- comment : string[2];
- secnames : array[tsection] of string[20];
- end;
- tarinfo = packed record
- id : tar;
- arcmd : string[50];
- end;
- tresinfo = packed record
- id : tres;
- resbin : string[8];
- rescmd : string[50];
- end;
- ttargetinfo = packed record
- target : ttarget;
- flags : set of ttargetflags;
- cpu : ttargetcpu;
- short_name : string[8];
- unit_env : string[12];
- system_unit : string[8];
- smartext,
- unitext,
- unitlibext,
- asmext,
- objext,
- resext,
- resobjext,
- exeext : string[4];
- os : tos;
- assem : tasm;
- assemsrc : tasm; { default source writing assembler }
- ar : tar;
- res : tres;
- heapsize,
- maxheapsize,
- stacksize : longint;
- end;
- tasmmodeinfo=packed record
- id : tasmmode;
- idtxt : string[8];
- end;
- var
- target_cpu : ttargetcpu;
- target_info : ttargetinfo;
- target_os : tosinfo;
- target_asm : tasminfo;
- target_ar : tarinfo;
- target_res : tresinfo;
- target_path : string[12]; { for rtl/<X>/,fcl/<X>/, etc. }
- source_os : tosinfo;
- function set_target_os(t:tos):boolean;
- function set_target_asm(t:tasm):boolean;
- function set_target_ar(t:tar):boolean;
- function set_target_res(t:tres):boolean;
- function set_target_info(t:ttarget):boolean;
- function set_string_target(s : string) : boolean;
- function set_string_asm(s : string) : boolean;
- function set_string_asmmode(s:string;var t:tasmmode):boolean;
- procedure InitSystems;
- implementation
- uses
- cutils;
- const
- {****************************************************************************
- OS Info
- ****************************************************************************}
- os_infos : array[1..oscnt] of tosinfo = (
- (
- id : os_none;
- name : 'No operating system';
- shortname : 'none'
- ),
- (
- id : os_i386_go32v1;
- name : 'GO32 V1 DOS extender';
- shortname : 'go32v1';
- sharedlibext : '.dll';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : ''; { No .exe, the linker only output a.out ! }
- defext : '.def';
- scriptext : '.bat';
- libprefix : '';
- Cprefix : '_';
- newline : #13#10;
- endian : endian_little;
- stackalignment : 2;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_i386_go32v2;
- name : 'GO32 V2 DOS extender';
- shortname : 'go32v2';
- sharedlibext : '.dll';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '.exe';
- defext : '.def';
- scriptext : '.bat';
- libprefix : '';
- Cprefix : '_';
- newline : #13#10;
- endian : endian_little;
- stackalignment : 2;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_i386_linux;
- name : 'Linux for i386';
- shortname : 'linux';
- sharedlibext : '.so';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '.def';
- scriptext : '.sh';
- libprefix : 'lib';
- Cprefix : '';
- newline : #10;
- endian : endian_little;
- stackalignment : 4;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_i386_FreeBSD;
- name : 'FreeBSD/ELF for i386';
- shortname : 'freebsd';
- sharedlibext : '.so';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '.def';
- scriptext : '.sh';
- libprefix : 'lib';
- Cprefix : '';
- newline : #10;
- endian : endian_little;
- stackalignment : 4;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_i386_os2;
- name : 'OS/2 via EMX';
- shortname : 'os2';
- sharedlibext : '.ao2';
- staticlibext : '.ao2';
- sourceext : '.pas';
- pasext : '.pp';
- exeext : '.exe';
- defext : '.def';
- scriptext : '.cmd';
- libprefix : '';
- Cprefix : '_';
- newline : #13#10;
- endian : endian_little;
- stackalignment : 4;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : false
- ),
- (
- id : os_i386_win32;
- name : 'Win32 for i386';
- shortname : 'win32';
- sharedlibext : '.dll';
- staticlibext : '.aw';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '.exe';
- defext : '.def';
- scriptext : '.bat';
- libprefix : 'lib';
- Cprefix : '_';
- newline : #13#10;
- endian : endian_little;
- stackalignment : 4;
- maxCrecordalignment : 16;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_i386_Netware;
- name : 'Netware for i386';
- shortname : 'netware';
- sharedlibext : '.nlm';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '.nlm';
- defext : '.def';
- scriptext : '.sh';
- libprefix : '';
- Cprefix : '';
- newline : #13#10;
- endian : endian_little;
- stackalignment : 4;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_m68k_amiga;
- name : 'Commodore Amiga';
- shortname : 'amiga';
- sharedlibext : '.library';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '';
- scriptext : '';
- libprefix : '';
- Cprefix : '_';
- newline : #10;
- endian : endian_big;
- stackalignment : 2;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : false
- ),
- (
- id : os_m68k_atari;
- name : 'Atari ST/STE';
- shortname : 'atari';
- sharedlibext : '.dll';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '.tpp';
- defext : '';
- scriptext : '';
- libprefix : '';
- Cprefix : '_';
- newline : #10;
- endian : endian_big;
- stackalignment : 2;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : false
- ),
- (
- id : os_m68k_mac;
- name : 'Macintosh m68k';
- shortname : 'mac';
- sharedlibext : 'Lib';
- staticlibext : 'Lib';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '';
- scriptext : '';
- libprefix : '';
- Cprefix : '_';
- newline : #13;
- endian : endian_big;
- stackalignment : 2;
- maxCrecordalignment : 4;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : false
- ),
- (
- id : os_m68k_linux;
- name : 'Linux for m68k';
- shortname : 'linux';
- sharedlibext : '.so';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '';
- scriptext : '.sh';
- libprefix : 'lib';
- Cprefix : '';
- newline : #10;
- endian : endian_big;
- stackalignment : 2;
- maxCrecordalignment : 32;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_m68k_palmos;
- name : 'PalmOS';
- shortname : 'palmos';
- sharedlibext : '.so';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '';
- scriptext : '.sh';
- libprefix : 'lib';
- Cprefix : '_';
- newline : #10;
- endian : endian_big;
- stackalignment : 2;
- maxCrecordalignment : 32;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : false
- ),
- (
- id : os_alpha_linux;
- name : 'Linux for Alpha';
- shortname : 'axplinux';
- sharedlibext : '.so';
- staticlibext : '.a';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '.def';
- scriptext : '.sh';
- libprefix : 'lib';
- Cprefix : '';
- newline : #10;
- endian : endian_little;
- stackalignment : 8;
- maxCrecordalignment : 32;
- size_of_pointer : 8;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_powerpc_linux;
- name : 'Linux for PowerPC';
- shortname : 'linuxppc';
- sharedlibext : '.so';
- staticlibext : '.s';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '.def';
- scriptext : '.sh';
- libprefix : 'lib';
- Cprefix : '';
- newline : #10;
- endian : endian_big;
- stackalignment : 8;
- maxCrecordalignment : 32;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- ),
- (
- id : os_powerpc_macos;
- name : 'MacOs (PowerPC)';
- shortname : 'MacOs/PPC';
- sharedlibext : 'Lib';
- staticlibext : 'Lib';
- sourceext : '.pp';
- pasext : '.pas';
- exeext : '';
- defext : '';
- scriptext : '';
- libprefix : '';
- Cprefix : '';
- newline : #13;
- endian : endian_big;
- stackalignment : 8;
- maxCrecordalignment : 32;
- size_of_pointer : 4;
- size_of_longint : 4;
- use_bound_instruction : false;
- use_function_relative_addresses : true
- )
- );
- {****************************************************************************
- Assembler Info
- ****************************************************************************}
- as_infos : array[1..asmcnt] of tasminfo = (
- (
- id : as_none;
- idtxt : 'no'
- )
- {$ifdef i386}
- ,(
- id : as_i386_as;
- idtxt : 'AS';
- asmbin : 'as';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '# ';
- secnames : ('',
- '.text','.data','.bss',
- '','','','','','',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_as_aout;
- idtxt : 'AS_AOUT';
- asmbin : 'as';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_i386_os2;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : 'L';
- comment : '# ';
- secnames : ('',
- '.text','.data','.bss',
- '','','','','','',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_asw;
- idtxt : 'ASW';
- asmbin : 'asw';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_i386_win32;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '# ';
- secnames : ('',
- '.text','.data','.section .bss',
- '.section .idata$2','.section .idata$4','.section .idata$5',
- '.section .idata$6','.section .idata$7','.section .edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_nasmcoff;
- idtxt : 'NASMCOFF';
- asmbin : 'nasm';
- asmcmd : '-f coff -o $OBJ $ASM';
- supported_target : target_i386_go32v2;
- allowdirect : true;
- externals : true;
- needar : true;
- labelprefix : 'L';
- comment : '; ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata2','.idata4','.idata5','.idata6','.idata7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_nasmwin32;
- idtxt : 'NASMWIN32';
- asmbin : 'nasm';
- asmcmd : '-f win32 -o $OBJ $ASM';
- supported_target : target_i386_win32;
- allowdirect : true;
- externals : true;
- needar : true;
- labelprefix : 'L';
- comment : '; ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata2','.idata4','.idata5','.idata6','.idata7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_nasmelf;
- idtxt : 'NASMELF';
- asmbin : 'nasm';
- asmcmd : '-f elf -o $OBJ $ASM';
- supported_target : target_i386_linux;
- allowdirect : true;
- externals : true;
- needar : true;
- labelprefix : 'L';
- comment : '; ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata2','.idata4','.idata5','.idata6','.idata7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_nasmobj;
- idtxt : 'NASMOBJ';
- asmbin : 'nasm';
- asmcmd : '-f obj -o $OBJ $ASM';
- supported_target : target_any; { what should I write here ?? }
- allowdirect : true;
- externals : true;
- needar : true;
- labelprefix : 'L';
- comment : '; ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata2','.idata4','.idata5','.idata6','.idata7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_tasm;
- idtxt : 'TASM';
- asmbin : 'tasm';
- asmcmd : '/m2 $ASM $OBJ';
- supported_target : target_any; { what should I write here ?? }
- allowdirect : true;
- externals : true;
- needar : true;
- labelprefix : '@@';
- comment : '; ';
- secnames : ('',
- 'CODE','DATA','BSS',
- '','','','','','',
- '','')
- )
- ,(
- id : as_i386_masm;
- idtxt : 'MASM';
- asmbin : 'masm';
- asmcmd : '$ASM $OBJ';
- supported_target : target_any; { what should I write here ?? }
- allowdirect : true;
- externals : true;
- needar : true;
- labelprefix : '.L';
- comment : '; ';
- secnames : ('',
- 'CODE','DATA','BSS',
- '','','','','','',
- '','')
- )
- ,(
- id : as_i386_dbg;
- idtxt : 'DBG';
- asmbin : '';
- asmcmd : '';
- supported_target : target_any;
- allowdirect : false;
- externals : true;
- needar : false;
- labelprefix : 'L';
- comment : '';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_coff;
- idtxt : 'COFF';
- asmbin : '';
- asmcmd : '';
- supported_target : target_i386_go32v2;
- allowdirect : false;
- externals : true;
- needar : false;
- labelprefix : '.L';
- comment : '';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_pecoff;
- idtxt : 'PECOFF';
- asmbin : '';
- asmcmd : '';
- supported_target : target_i386_win32;
- allowdirect : false;
- externals : true;
- needar : false;
- labelprefix : '.L';
- comment : '';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_i386_elf;
- idtxt : 'ELF';
- asmbin : '';
- asmcmd : '';
- supported_target : target_any; //target_i386_linux;
- allowdirect : false;
- externals : true;
- needar : false;
- labelprefix : '.L';
- comment : '';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- {$endif i386}
- {$ifdef m68k}
- ,(
- id : as_m68k_as;
- idtxt : 'AS';
- asmbin : 'as';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '# ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_m68k_gas;
- idtxt : 'GAS';
- asmbin : 'as68k'; { Gas for the Amiga}
- asmcmd : '--register-prefix-optional -o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '| ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_m68k_mit;
- idtxt : 'MIT';
- asmbin : '';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '| ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_m68k_mot;
- idtxt : 'MOT';
- asmbin : '';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '__L';
- comment : '| ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- ,(
- id : as_m68k_mpw;
- idtxt : 'MPW';
- asmbin : '';
- asmcmd : '-model far -o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '__L';
- comment : '* ';
- secnames : ('',
- '.text','.data','.bss',
- '.idata$2','.idata$4','.idata$5','.idata$6','.idata$7','.edata',
- '.stab','.stabstr')
- )
- {$endif m68k}
- {$ifdef alpha}
- ,(
- id : as_alpha_as;
- idtxt : 'AS';
- asmbin : 'as';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '# ';
- secnames : ('',
- '.text','.data','.bss',
- '','','','','','',
- '.stab','.stabstr')
- )
- {$endif}
- {$ifdef powerpc}
- ,(
- id : as_powerpc_as;
- idtxt : 'AS';
- asmbin : 'as';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '# ';
- secnames : ('',
- '.text','.data','.bss',
- '','','','','','',
- '.stab','.stabstr')
- )
- ,(
- id : as_powerpc_mpw;
- idtxt : 'PPCAsm';
- asmbin : 'PPCAsm';
- asmcmd : '-o $OBJ $ASM';
- supported_target : target_any;
- allowdirect : true;
- externals : false;
- needar : true;
- labelprefix : '.L';
- comment : '; ';
- secnames : ('',
- '.text','.data','.bss',
- '','','','','','',
- '.stab','.stabstr')
- )
- {$endif}
- );
- {****************************************************************************
- Ar Info
- ****************************************************************************}
- ar_infos : array[1..arcnt] of tarinfo = (
- (
- id : ar_none
- )
- {$ifdef i386}
- ,(
- id : ar_i386_ar;
- arcmd : 'ar rs $LIB $FILES'
- ),
- (
- id : ar_i386_arw;
- arcmd : 'arw rs $LIB $FILES'
- )
- {$endif i386}
- {$ifdef m68k}
- ,(
- id : ar_m68k_ar;
- arcmd : 'ar rs $LIB $FILES'
- )
- {$endif m68k}
- {$ifdef alpha}
- ,(
- id : ar_alpha_ar;
- arcmd : 'ar rs $LIB $FILES'
- )
- {$endif}
- {$ifdef powerpc}
- ,(
- id : ar_powerpc_ar;
- arcmd : 'ar rs $LIB $FILES'
- )
- {$endif}
- );
- {****************************************************************************
- Res Info
- ****************************************************************************}
- res_infos : array[1..rescnt] of tresinfo = (
- (
- id : res_none
- )
- {$ifdef i386}
- ,(
- id : res_i386_windres;
- resbin : 'windres';
- rescmd : '--include $INC -O coff -o $OBJ $RES'
- )
- ,(
- id : res_i386_emx;
- resbin : 'emxbind';
- rescmd : '-b -r $RES $OBJ'
- (* Not really used - see TLinkeros2.SetDefaultInfo in t_os2.pas. *)
- )
- {$endif i386}
- {$ifdef m68k}
- ,(
- id : res_m68k_mpw;
- resbin : 'rez';
- rescmd : '-i $INC -o $OBJ $RES'
- )
- {$endif m68}
- {$ifdef powerpc}
- ,(
- id : res_powerpc_mpw;
- resbin : 'rez';
- rescmd : '-i $INC -o $OBJ $RES'
- )
- {$endif powerpc}
- );
- {****************************************************************************
- Targets Info
- ****************************************************************************}
- target_infos : array[1..targetcnt] of ttargetinfo = (
- (
- target : target_none;
- flags : [];
- cpu : no_cpu;
- short_name : 'notarget'
- )
- {$ifdef i386}
- ,(
- target : target_i386_GO32V1;
- flags : [];
- cpu : i386;
- short_name : 'GO32V1';
- unit_env : 'GO32V1UNITS';
- system_unit : 'SYSTEM';
- smartext : '.sl';
- unitext : '.pp1';
- unitlibext : '.ppl';
- asmext : '.s1';
- objext : '.o1';
- resext : '.res';
- resobjext : '.o1r';
- exeext : ''; { The linker produces a.out }
- os : os_i386_GO32V1;
- assem : as_i386_as;
- assemsrc : as_i386_as;
- ar : ar_i386_ar;
- res : res_none;
- heapsize : 2048*1024;
- maxheapsize : 32768*1024;
- stacksize : 16384
- ),
- (
- target : target_i386_GO32V2;
- flags : [];
- cpu : i386;
- short_name : 'GO32V2';
- unit_env : 'GO32V2UNITS';
- system_unit : 'SYSTEM';
- smartext : '.sl';
- unitext : '.ppu';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '.exe';
- os : os_i386_GO32V2;
- assem : as_i386_coff;
- assemsrc : as_i386_as;
- ar : ar_i386_ar;
- res : res_none;
- heapsize : 2048*1024;
- maxheapsize : 32768*1024;
- stacksize : 16384
- ),
- (
- target : target_i386_LINUX;
- flags : [];
- cpu : i386;
- short_name : 'LINUX';
- unit_env : 'LINUXUNITS';
- system_unit : 'syslinux';
- smartext : '.sl';
- unitext : '.ppu';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_i386_Linux;
- assem : as_i386_elf;
- assemsrc : as_i386_as;
- ar : ar_i386_ar;
- res : res_none;
- heapsize : 256*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- ),
- (
- target : target_i386_FreeBSD;
- flags : [];
- cpu : i386;
- short_name : 'FREEBSD';
- unit_env : 'BSDUNITS';
- system_unit : 'sysbsd';
- smartext : '.sl';
- unitext : '.ppu';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_i386_Freebsd;
- assem : as_i386_elf;
- assemsrc : as_i386_as;
- ar : ar_i386_ar;
- res : res_none;
- heapsize : 256*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- ),
- (
- target : target_i386_OS2;
- flags : [tf_need_export];
- cpu : i386;
- short_name : 'OS2';
- unit_env : 'OS2UNITS';
- system_unit : 'SYSOS2';
- smartext : '.sl';
- unitext : '.ppo';
- unitlibext : '.ppl';
- asmext : '.so2';
- objext : '.oo2';
- resext : '.res';
- resobjext : '.oor';
- exeext : ''; { The linker produces a.out }
- os : os_i386_OS2;
- assem : as_i386_as_aout;
- assemsrc : as_i386_as_aout;
- ar : ar_i386_ar;
- res : res_i386_emx;
- heapsize : 256*1024;
- maxheapsize : 32768*1024;
- stacksize : 256*1024
- ),
- (
- target : target_i386_WIN32;
- flags : [];
- cpu : i386;
- short_name : 'WIN32';
- unit_env : 'WIN32UNITS';
- system_unit : 'SYSWIN32';
- smartext : '.slw';
- unitext : '.ppw';
- unitlibext : '.ppl';
- asmext : '.sw';
- objext : '.ow';
- resext : '.rc';
- resobjext : '.owr';
- exeext : '.exe';
- os : os_i386_Win32;
- assem : as_i386_pecoff;
- assemsrc : as_i386_asw;
- ar : ar_i386_arw;
- res : res_i386_windres;
- heapsize : 256*1024;
- maxheapsize : 32*1024*1024;
- stacksize : 32*1024*1024
- ),
- (
- target : target_i386_NETWARE;
- flags : [];
- cpu : i386;
- short_name : 'NETWARE';
- unit_env : 'NETWAREUNITS';
- system_unit : 'sysnetwa';
- smartext : '.sl';
- unitext : '.ppn';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.on';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_i386_Netware;
- assem : as_i386_elf;
- assemsrc : as_i386_as;
- ar : ar_i386_ar;
- res : res_none;
- heapsize : 256*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- )
- {$endif i386}
- {$ifdef m68k}
- ,(
- target : target_m68k_Amiga;
- flags : [];
- cpu : m68k;
- short_name : 'AMIGA';
- unit_env : '';
- system_unit : 'sysamiga';
- smartext : '.sl';
- unitext : '.ppa';
- unitlibext : '.ppl';
- asmext : '.asm';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_m68k_Amiga;
- assem : as_m68k_as;
- assemsrc : as_m68k_as;
- ar : ar_m68k_ar;
- res : res_none;
- heapsize : 128*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- ),
- (
- target : target_m68k_Atari;
- flags : [];
- cpu : m68k;
- short_name : 'ATARI';
- unit_env : '';
- system_unit : 'SYSATARI';
- smartext : '.sl';
- unitext : '.ppt';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '.ttp';
- os : os_m68k_Atari;
- assem : as_m68k_as;
- assemsrc : as_m68k_as;
- ar : ar_m68k_ar;
- res : res_none;
- heapsize : 16*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- ),
- (
- target : target_m68k_Mac;
- flags : [];
- cpu : m68k;
- short_name : 'MACOS';
- unit_env : '';
- system_unit : 'sysmac';
- smartext : '.sl';
- unitext : '.ppt';
- unitlibext : '.ppl';
- asmext : '.a';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_m68k_Mac;
- assem : as_m68k_mpw;
- assemsrc : as_m68k_mpw;
- ar : ar_m68k_ar;
- res : res_none;
- heapsize : 128*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- ),
- (
- target : target_m68k_linux;
- flags : [];
- cpu : m68k;
- short_name : 'LINUX';
- unit_env : 'LINUXUNITS';
- system_unit : 'syslinux';
- smartext : '.sl';
- unitext : '.ppu';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_m68k_Linux;
- assem : as_m68k_as;
- assemsrc : as_m68k_as;
- ar : ar_m68k_ar;
- res : res_none;
- heapsize : 128*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- ),
- (
- target : target_m68k_PalmOS;
- flags : [];
- cpu : m68k;
- short_name : 'PALMOS';
- unit_env : 'PALMUNITS';
- system_unit : 'syspalm';
- smartext : '.sl';
- unitext : '.ppu';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_m68k_PalmOS;
- assem : as_m68k_as;
- assemsrc : as_m68k_as;
- ar : ar_m68k_ar;
- res : res_none;
- heapsize : 128*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- )
- {$endif m68k}
- {$ifdef alpha}
- ,(
- target : target_alpha_LINUX;
- flags : [];
- cpu : alpha;
- short_name : 'LINUX';
- unit_env : 'LINUXUNITS';
- system_unit : 'syslinux';
- smartext : '.sl';
- unitext : '.ppu';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_alpha_Linux;
- assem : as_alpha_as;
- assemsrc : as_alpha_as;
- ar : ar_alpha_ar;
- res : res_none;
- heapsize : 256*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- )
- {$endif}
- {$ifdef powerpc}
- ,(
- target : target_powerpc_LINUX;
- flags : [];
- cpu : powerpc;
- short_name : 'LINUX';
- unit_env : '';
- system_unit : 'syslinux';
- smartext : '.sl';
- unitext : '.ppu';
- unitlibext : '.ppl';
- asmext : '.s';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_powerpc_Linux;
- assem : as_powerpc_as;
- assemsrc : as_powerpc_as;
- ar : ar_powerpc_ar;
- res : res_none;
- heapsize : 256*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- ),
- (
- target : target_powerpc_MACOS;
- flags : [];
- cpu : powerpc;
- short_name : 'MACOS';
- unit_env : '';
- system_unit : 'sysmac';
- smartext : '.sl';
- unitext : '.ppt';
- unitlibext : '.ppl';
- asmext : '.a';
- objext : '.o';
- resext : '.res';
- resobjext : '.or';
- exeext : '';
- os : os_powerpc_macos;
- assem : as_powerpc_mpw;
- assemsrc : as_powerpc_mpw;
- ar : ar_powerpc_ar;
- res : res_powerpc_mpw;
- heapsize : 256*1024;
- maxheapsize : 32768*1024;
- stacksize : 8192
- )
- {$endif}
- );
- {****************************************************************************
- AsmModeInfo
- ****************************************************************************}
- asmmodeinfos : array[1..asmmodecnt] of tasmmodeinfo = (
- (
- id : asmmode_none;
- idtxt : 'none'
- )
- {$ifdef i386}
- ,(
- id : asmmode_i386_direct;
- idtxt : 'DIRECT'
- ),
- (
- id : asmmode_i386_att;
- idtxt : 'ATT'
- ),
- (
- id : asmmode_i386_intel;
- idtxt : 'INTEL'
- )
- {$endif i386}
- {$ifdef m68k}
- ,(
- id : asmmode_m68k_mot;
- idtxt : 'MOT'
- )
- {$endif m68k}
- {$ifdef alpha}
- ,(
- id : asmmode_alpha_direct;
- idtxt : 'DIRECT'
- )
- {$endif}
- {$ifdef powerpc}
- ,(
- id : asmmode_powerpc_direct;
- idtxt : 'DIRECT'
- )
- {$endif}
- );
- {****************************************************************************
- Helpers
- ****************************************************************************}
- function set_target_os(t:tos):boolean;
- var
- i : longint;
- begin
- set_target_os:=false;
- { target 1 is none }
- for i:=2 to oscnt do
- if os_infos[i].id=t then
- begin
- target_os:=os_infos[i];
- set_target_os:=true;
- exit;
- end;
- end;
- function set_target_asm(t:tasm):boolean;
- var
- i : longint;
- begin
- set_target_asm:=false;
- for i:=1 to asmcnt do
- if as_infos[i].id=t then
- begin
- target_asm:=as_infos[i];
- set_target_asm:=true;
- exit;
- end;
- end;
- function set_target_ar(t:tar):boolean;
- var
- i : longint;
- begin
- set_target_ar:=false;
- for i:=1 to arcnt do
- if ar_infos[i].id=t then
- begin
- target_ar:=ar_infos[i];
- set_target_ar:=true;
- exit;
- end;
- end;
- function set_target_res(t:tres):boolean;
- var
- i : longint;
- begin
- set_target_res:=false;
- for i:=1 to rescnt do
- if res_infos[i].id=t then
- begin
- target_res:=res_infos[i];
- set_target_res:=true;
- exit;
- end;
- end;
- function set_target_info(t:ttarget):boolean;
- var
- i : longint;
- begin
- set_target_info:=false;
- for i:=1 to targetcnt do
- if target_infos[i].target=t then
- begin
- target_info:=target_infos[i];
- set_target_os(target_info.os);
- set_target_asm(target_info.assem);
- set_target_ar(target_info.ar);
- set_target_res(target_info.res);
- target_path:=lower(target_info.short_name);
- target_cpu:=target_info.cpu;
- set_target_info:=true;
- exit;
- end;
- end;
- {****************************************************************************
- Load from string
- ****************************************************************************}
- function set_string_target(s : string) : boolean;
- var
- i : longint;
- begin
- set_string_target:=false;
- { this should be case insensitive !! PM }
- s:=upper(s);
- for i:=1 to targetcnt do
- if target_infos[i].short_name=s then
- begin
- set_target_info(target_infos[i].target);
- set_string_target:=true;
- exit;
- end;
- end;
- function set_string_asm(s : string) : boolean;
- var
- i : longint;
- begin
- set_string_asm:=false;
- { this should be case insensitive !! PM }
- s:=upper(s);
- for i:=1 to asmcnt do
- if as_infos[i].idtxt=s then
- begin
- target_asm:=as_infos[i];
- set_string_asm:=true;
- end;
- end;
- function set_string_asmmode(s:string;var t:tasmmode):boolean;
- var
- i : longint;
- begin
- set_string_asmmode:=false;
- { this should be case insensitive !! PM }
- s:=upper(s);
- for i:=1 to asmmodecnt do
- if asmmodeinfos[i].idtxt=s then
- begin
- t:=asmmodeinfos[i].id;
- set_string_asmmode:=true;
- end;
- end;
- {****************************************************************************
- Initialization of default target
- ****************************************************************************}
- procedure default_os(t:ttarget);
- begin
- set_target_info(t);
- if source_os.name='' then
- source_os:=target_os;
- end;
- procedure set_source_os(t:tos);
- var
- i : longint;
- begin
- { can't use message() here (PFV) }
- if source_os.name<>'' then
- Writeln('Warning: Source OS Redefined!');
- for i:=1 to oscnt do
- if os_infos[i].id=t then
- begin
- source_os:=os_infos[i];
- exit;
- end;
- end;
- procedure InitSystems;
- begin
- { first get source OS }
- source_os.name:='';
- { please note then we use cpu86 and cpu68 here on purpose !! }
- {$ifdef cpu86}
- {$ifdef GO32V1}
- set_source_os(os_i386_GO32V1);
- {$else}
- {$ifdef GO32V2}
- set_source_os(os_i386_GO32V2);
- {$else}
- {$ifdef OS2}
- set_source_os(os_i386_OS2);
- if (OS_Mode = osDOS) or (OS_Mode = osDPMI)
- then source_os.scriptext := '.bat';
- {OS/2 via EMX can be run under DOS as well}
- {$else}
- {$ifdef LINUX}
- {$Ifdef BSD}
- set_source_os(os_i386_FreeBSD);
- {$else}
- set_source_os(os_i386_LINUX);
- {$endif}
- {$else}
- {$ifdef WIN32}
- set_source_os(os_i386_WIN32);
- {$endif win32}
- {$endif linux}
- {$endif os2}
- {$endif go32v2}
- {$endif go32v1}
- {$endif cpu86}
- {$ifdef cpu68}
- {$ifdef AMIGA}
- set_source_os(os_m68k_Amiga);
- {$else}
- {$ifdef ATARI}
- set_source_os(os_m68k_Atari);
- {$else}
- {$ifdef MACOS}
- set_source_os(os_m68k_MAC);
- {$else}
- {$ifdef LINUX}
- set_source_os(os_m68k_linux);
- {$endif linux}
- {$endif macos}
- {$endif atari}
- {$endif amiga}
- {$endif cpu68}
- { Now default target !! }
- {$ifdef i386}
- {$ifdef GO32V1}
- default_os(target_i386_GO32V1);
- {$else}
- {$ifdef GO32V2}
- default_os(target_i386_GO32V2);
- {$else}
- {$ifdef OS2}
- default_os(target_i386_OS2);
- {$else}
- {$ifdef LINUX}
- {$ifdef BSD}
- default_os(target_i386_FreeBSD);
- {$else}
- default_os(target_i386_LINUX);
- {$endif}
- {$else}
- {$ifdef WIN32}
- default_os(target_i386_WIN32);
- {$else}
- default_os(target_i386_GO32V2);
- {$endif win32}
- {$endif linux}
- {$endif os2}
- {$endif go32v2}
- {$endif go32v1}
- {$endif i386}
- {$ifdef m68k}
- {$ifdef AMIGA}
- default_os(target_m68k_Amiga);
- {$else}
- {$ifdef ATARI}
- default_os(target_m68k_Atari);
- {$else}
- {$ifdef MACOS}
- default_os(target_m68k_Mac);
- {$else}
- {$ifdef LINUX}
- default_os(target_m68k_linux);
- {$else}
- default_os(target_m68k_Amiga);
- {$endif linux}
- {$endif macos}
- {$endif atari}
- {$endif amiga}
- {$endif m68k}
- {$ifdef alpha}
- default_os(target_alpha_linux);
- {$endif alpha}
- {$ifdef powerpc}
- default_os(target_powerpc_linux);
- {$endif powerpc}
- end;
- begin
- InitSystems;
- end.
- {
- $Log$
- Revision 1.10 2000-09-24 21:12:41 hajny
- * OS/2 stack alignment corrected + default stack increased
- Revision 1.9 2000/09/24 15:06:30 peter
- * use defines.inc
- Revision 1.8 2000/09/20 10:49:39 marco
- * Set writer to elf. (Only a prob for smart with -OG3p3r)
- Revision 1.7 2000/09/16 12:22:52 peter
- * freebsd support merged
- Revision 1.6 2000/09/11 17:00:23 florian
- + first implementation of Netware Module support, thanks to
- Armin Diehl ([email protected]) for providing the patches
- Revision 1.5 2000/08/12 19:14:59 peter
- * ELF writer works now also with -g
- * ELF writer is default again for linux
- Revision 1.4 2000/07/14 21:29:38 michael
- * Back to external assembler till peter fixes gdb
- Revision 1.3 2000/07/13 12:08:28 michael
- + patched to 1.1.0 with former 1.09patch from peter
- Revision 1.2 2000/07/13 11:32:50 michael
- + removed logs
- }
|