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

TargetOS equ Dummy

macro @BinaryType type {
  if type eq GUI
  end if

  if type eq console
  end if

  if type eq DLL
  end if

}


macro @AllDataSection {
  IncludeAllGlobals
}


macro @AllDataEmbeded {
  @AllDataSection
}


macro __create_dll_list {
  DynamicLibList equ
  rept DynamicLibList@count i:1 \{
    match any, DynamicLibList \\{
      match name:filename, DynamicLibList\\#i \\\{
        DynamicLibList equ DynamicLibList, name, \\\`name\\\#'.dll'
      \\\}
    \\}

    match , DynamicLibList \\{
      match name:filename, DynamicLibList\\#i \\\{
        DynamicLibList equ name, \\\`name\\\#'.dll'
      \\\}
    \\}
  \}
}

macro __create_all_imports {
   __create_dll_list

   match liblist, DynamicLibList \{
     library liblist
   \}

  rept DynamicLibList@count i:1 \{
    match name:filename, DynamicLibList\#i \\{
      \\include filename
    \\}
  \}
}


macro @AllImportSection {
;  section '.idata' import readable
;    __create_all_imports
}


macro @AllImportEmbeded {
;  data import
;    __create_all_imports
;  end data
}






