Added a Makefile

This commit is contained in:
Bartłomiej Szostak 2024-04-26 18:41:51 +02:00
parent 4fb070fe50
commit 2ffa57c9c4
No known key found for this signature in database
GPG Key ID: 562DACF230A18086
3 changed files with 15 additions and 4 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ sillymachine
*.sib
*.ali
*.o
*.exe

13
Makefile Normal file
View File

@ -0,0 +1,13 @@
default: sillymachine
sillymachine: ./src/sillymachine.adb
gnatmake ./src/sillymachine.adb
sillymachine.exe: ./src/sillymachine.adb
x86_64-w64-mingw32-gnatmake src/sillymachine.adb -lwinmm -lgdi32
all: sillymachine sillymachine.exe
clean:
rm *.o *.ali sillymachine.exe sillymachine

View File

@ -19,10 +19,7 @@ package body Shardware is
function Bytes_To_I (Instruction : ByteArr) return Integer is
begin
return Integer(My_ShiftI(Instruction (7), 24)
+ My_ShiftI(Instruction (8), 16)
+ My_ShiftI(Instruction (9), 8)
+ Integer(Instruction (10)));
return Integer(Bytes_To_U(Instruction));
end Bytes_To_I;
function Bytes_To_U (Instruction : ByteArr) return Unsigned_32 is