Skip to content

Commit

Permalink
* Extend VPATH in the case of source code defined in other
Browse files Browse the repository at this point in the history
          directories.

          For #255
  • Loading branch information
yoogx committed May 29, 2020
1 parent b6cb791 commit 9c069f8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/backends/ocarina-backends-build_utils.adb
Original file line number Diff line number Diff line change
Expand Up @@ -2005,17 +2005,22 @@ package body Ocarina.Backends.Build_Utils is
---------------------

procedure Compile_C_Files (C_Sources : Name_Tables.Instance) is
pragma Unreferenced (C_Sources);

begin
-- Define VPATH, search path for All Prerequisites

Write_Str ("VPATH = ../..");
if Scenario_Dir /= null then
Write_Str (":" & Scenario_Dir.all);
end if;
Write_Eol;
Write_Eol;

if Length (C_Sources) > 0 then
for J in Name_Tables.First .. Name_Tables.Last (C_Sources) loop
Write_Str (":");
Write_Str
(Dir_Name (Get_Name_String (C_Sources.Table (J))));
exit when J = Name_Tables.Last (C_Sources);
end loop;
end if;

-- Generic rule for compiling C files

Expand Down

0 comments on commit 9c069f8

Please sign in to comment.