-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake_ep1.bat
42 lines (32 loc) · 1.15 KB
/
make_ep1.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
:: This make_ep1.bat script was created by EXL, 29-Mar-2023.
:: Default platform is Motorola P2K, ElfPack v1.x, ADS1.2 [Build 848] on Windows.
:: Warning: `-nodebug` flag option for `armlink` is buggy.
:: Uncomment it for disable verbose output.
:: @echo off
if /I "%1"=="clean" (
if exist *.o del *.o
if exist *.obj del *.obj
if exist *.elfp del *.elfp
if exist *.elf del *.elf
exit /b 0
)
:: Compiler path.
set ARM_PATH=C:\ARM
:: SDK path.
set SDK_PATH=%ARM_PATH%\SDK
:: Libraries path.
set LIB_PATH=%ARM_PATH%\lib
:: Main link library.
set LIB_MAIN=Lib.o
:: Defines.
set DEFINES=-D__P2K__ -DEP1 -DROT_90 -DFPS_15
:: set DEFINES=-D__P2K__ -DEP1 -DROT_90 -DFPS_15 -DFTR_V600
:: Project/ELF name.
set ELF_NAME=Perlin
:: Compiling step.
%ARM_PATH%\tcc -I%SDK_PATH% %DEFINES% -bigend -apcs /interwork -O2 -c Engine.c -o Engine.o
%ARM_PATH%\tcc -I%SDK_PATH% %DEFINES% -bigend -apcs /interwork -O2 -c Trig.c -o Trig.o
%ARM_PATH%\tcc -I%SDK_PATH% %DEFINES% -bigend -apcs /interwork -O2 -c %ELF_NAME%.c -o %ELF_NAME%.o
:: Linking step.
%ARM_PATH%\armlink -nolocals -reloc -first %LIB_MAIN%(Lib) %ELF_NAME%.o Engine.o Trig.o %LIB_PATH%\%LIB_MAIN% ^
-o %ELF_NAME%.elf