; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "BSD 2-clause" license."          |
;|_______________________________________________________________________________________|
;
;  Description: Executable file formating macro library.
;
;  Target OS: Any
;
;  Dependencies:
;
;  Notes: Includes OS dependent versions of the library.
;_________________________________________________________________________________________


include '%TargetOS%/_executable.inc'


macro module name {
  ___StartLibAddress = $
  ___LibraryName equ name
}

macro endmodule {
  DispSize ___LibraryName, $-___StartLibAddress
  restore ___LibraryName
}


macro uses [libname] {
forward
  local nm, fn
  nm equ libname
  fn equ '%lib%/imports/%TargetOS%/'#`libname#'.inc'
  match name:filename, libname \{
    nm equ name
    fn equ filename
  \}
  ppAddUniqueList DynamicLibList, nm#:#fn
}

ppInitList DynamicLibList




