-
Notifications
You must be signed in to change notification settings - Fork 2
/
make_ep2.bat
72 lines (58 loc) · 2.65 KB
/
make_ep2.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
:: This make_ep2.bat script was created by EXL, 03-Sep-2023.
:: Default platform is Motorola P2K, ElfPack v2.x, devkitARM release 26 (GCC 4.4.0) on Windows.
:: 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:\devkitARM
:: SDK path.
set SDK_PATH=%ARM_PATH%\SDK
:: Libraries path.
set LIB_PATH=%ARM_PATH%\lib
:: Main link library.
set LIB_MAIN=std.sa
:: Libc link library.
set LIB_LIBC=libc.a
:: Defines.
set DEFINES=-D__P2K__ -DEP2 -DLINUX_BOGOMIPS
:: set DEFINES=-D__P2K__ -DEP2 -DLINUX_BOGOMIPS -DNO_ASM
:: set DEFINES=-D__P2K__ -DEP2 -DPALMOS_BOGOMIPS
:: set DEFINES=-D__P2K__ -DEP2 -DPALMOS_BOGOMIPS -DFTR_V600
:: set DEFINES=-D__P2K__ -DEP2 -DPALMOS_BOGOMIPS -DFTR_L7E
:: Includes.
set INCLUDES=-I.
:: Optimization.
set OPTIM=-O2
:: Project/ELF name.
set ELF_NAME=Benchmark
:: Compiling step.
%ARM_PATH%\bin\arm-eabi-gcc -c -Wall -mbig-endian -marm -mthumb-interwork -nostdlib ^
-fshort-wchar -fshort-enums -fpack-struct=4 -fno-builtin -fvisibility=hidden ^
-I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% delay_armv4t_GCC.S -o delay_armv4t_GCC.o
%ARM_PATH%\bin\arm-eabi-gcc -c -Wall -mbig-endian -mthumb -mthumb-interwork -nostdlib ^
-fshort-wchar -fshort-enums -fpack-struct=4 -fno-builtin -fvisibility=hidden ^
-I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% dhry_1.c -o dhry_1.o
%ARM_PATH%\bin\arm-eabi-gcc -c -Wall -mbig-endian -mthumb -mthumb-interwork -nostdlib ^
-fshort-wchar -fshort-enums -fpack-struct=4 -fno-builtin -fvisibility=hidden ^
-I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% dhry_2.c -o dhry_2.o
%ARM_PATH%\bin\arm-eabi-gcc -c -Wall -mbig-endian -mthumb -mthumb-interwork -nostdlib ^
-fshort-wchar -fshort-enums -fpack-struct=4 -fno-builtin -fvisibility=hidden ^
-I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% Phases.c -o Phases.o
%ARM_PATH%\bin\arm-eabi-gcc -c -Wall -mbig-endian -mthumb -mthumb-interwork -nostdlib ^
-fshort-wchar -fshort-enums -fpack-struct=4 -fno-builtin -fvisibility=hidden ^
-I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% FireEffect.c -o FireEffect.o
%ARM_PATH%\bin\arm-eabi-gcc -c -Wall -mbig-endian -mthumb -mthumb-interwork -nostdlib ^
-fshort-wchar -fshort-enums -fpack-struct=4 -fno-builtin -fvisibility=hidden ^
-I%SDK_PATH% %INCLUDES% %DEFINES% %OPTIM% %ELF_NAME%.c -o %ELF_NAME%.o
:: Linking step.
%ARM_PATH%\bin\arm-eabi-ld -pie -EB %OPTIM% -nostdlib ^
delay_armv4t_GCC.o dhry_1.o dhry_2.o Phases.o FireEffect.o %ELF_NAME%.o ^
%LIB_PATH%\%LIB_MAIN% %LIB_PATH%\%LIB_LIBC% -o %ELF_NAME%.elfp
:: Post linking step.
%ARM_PATH%\libgen\postlink.exe %ELF_NAME%.elfp -o %ELF_NAME%.elf