; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "Fresh artistic license."         |
;|_______________________________________________________________________________________|
;
;  Description: Executable file formating macro library.
;
;  Target OS: Win32
;
;  Dependencies:
;
;  Notes:
;_________________________________________________________________________________________

TargetOS equ Win32

macro _BinaryType type {
  if type eq GUI
    format PE GUI 4.0
    entry start
  end if

  if type eq console
    format PE Console 4.0
    entry start
  end if

  if type eq DLL
    format PE GUI 4.0 DLL
    entry EntryPoint
  end if

  section '.code' code readable writeable executable
}


macro _AllDataSection {
  section '.data' data readable writeable
  IncludeAllGlobals
}


macro _AllDataEmbeded {
  IncludeAllGlobals
}


macro _AllImportSection {
  section '.idata' import readable
  \include '%lib%/imports/allimports.asm'
}


macro _AllImportEmbeded {
  data import
  \include '%lib%/imports/allimports.asm'
  end data
}