I am trying to compile an ada program but I am having the following error: test.adb:4:06: file "motormachinestate.ads" not found
. Of course, the problem is that the Makefile is wrong. I have been searching how to fix it but I have been unable.
The program files are the following:
MotorMachineState.ads: This file contains a package declaration. It contains procedures etc. that are used by the program-
MotorMachineState.adb: This file contains the above one's implementation. it is a package body.
test.adb: This is the program's entry point. It uses the MotorMachineState to perform some operations.
Makefile: The makefile I am using to compile.
Below there is a description of the mentioned files:
MotorMachineState.ads
package MotorMachineState is
protected Motor is
[...]
end Motor;
end MotorMachineState;
MotorMachineState.adb
with Ada.Text_IO;
with Ada.Real_Time;
with Ada.Integer_Text_IO;
use Ada.Text_IO;
use Ada.Real_Time;
use Ada.Integer_Text_IO;
package body MotorMachineState is
protected body Motor is
[...]
end Motor;
end MotorMachineState;
test.adb
with Ada.Text_IO;
with Ada.Real_Time;
with Ada.Integer_Text_IO;
with MotorMachineState;
use Ada.Text_IO;
use Ada.Real_Time;
use Ada.Integer_Text_IO;
use MotorMachineState;
procedure test is
begin
Put_Line("This is a test");
Motor.setPower(20);
[...]
end test;
Makefile
ADA::
gnatmake -c test.adb MotorMachineState.adb
gnatbind test.ali MotorMachineState.ali
gnatlink test.ali MotorMachineState.ali
clean::
rm *.o *.ali main