-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
40 lines (31 loc) · 974 Bytes
/
Makefile
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
# This Makefile was created by EXL, 07-Sep-2023.
# Default platform is Motorola P2K, ElfPack v1.x, ADS1.2 [Build 848] on Linux.
# Warning: `-nodebug` flag option for `armlink` is buggy.
# Compiler path.
ARM_PATH = /opt/arm
# SDK path.
SDK_PATH = $(ARM_PATH)/SDK
# Libraries path.
LIB_PATH = $(ARM_PATH)/lib
# Main link library.
LIB_MAIN = Lib.o
# Defines.
DEFINES = -D__P2K__ -DEP1
#DEFINES = -D__P2K__ -DEP1 -DFTR_V600
#DEFINES = -D__P2K__ -DEP1 -DFTR_L7E
#DEFINES = -D__P2K__ -DEP1 -DDISABLE_ALL_INT
# Project/ELF name.
ELF_NAME = Overclock
all:
$(ARM_PATH)/bin/tcc -I$(SDK_PATH) $(DEFINES) -bigend -apcs /interwork -O2 -c Clock.c \
-o Clock.o
$(ARM_PATH)/bin/tcc -I$(SDK_PATH) $(DEFINES) -bigend -apcs /interwork -O2 -c $(ELF_NAME).c \
-o $(ELF_NAME).o
$(ARM_PATH)/bin/armlink -nolocals -reloc -first $(LIB_MAIN)\(Lib\) \
Clock.o $(ELF_NAME).o \
$(LIB_PATH)/$(LIB_MAIN) -o $(ELF_NAME).elf
clean:
-rm -f *.o
-rm -f *.obj
-rm -f *.elfp
-rm -f *.elf