blob: 1edb990d4f5ffdad8b36646b2e11f4aca87375ec (
plain) (
blame)
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
|
SDIR = ./
ODIR = ./
DEFINES = -DUSE_CLIB -DLINUX -DARM -DGNU_C -DELF
all: $(ODIR)_startup.o
$(ODIR)_startup.o: $(ODIR)armstartup.o $(ODIR)armfileIO3.o $(ODIR)scon.o $(ODIR)ufileIO2.o $(ODIR)armdivmod.o
ld -r -o $(ODIR)_startup.o $(ODIR)armstartup.o $(ODIR)armdivmod.o $(ODIR)scon.o $(ODIR)armfileIO3.o $(ODIR)ufileIO2.o
$(ODIR)scon.o: $(SDIR)scon.c
# gcc -c -O $(DEFINES) -o $(ODIR)scon.o $(SDIR)scon.c
$(CC) -O $(DEFINES) -ffunction-sections -fdata-sections $(SDIR)scon.c -S -o $(ODIR)scon.s
mv $(ODIR)scon.s $(ODIR)scon.s.copy
grep -v -w ___main $(ODIR)scon.s.copy > $(ODIR)scon.s
as $(DEFINES_A) $(ODIR)scon.s -o $(ODIR)scon.o
$(ODIR)ufileIO2.o: $(SDIR)ufileIO2.c
gcc -c -O $(DEFINES) -ffunction-sections -fdata-sections -o $(ODIR)ufileIO2.o $(SDIR)ufileIO2.c
$(ODIR)armstartup.o: $(SDIR)armstartup.s
as $(ODIR)armstartup.s -o $(ODIR)armstartup.o
$(ODIR)armfileIO3.o: $(SDIR)armfileIO3.s
as $(ODIR)armfileIO3.s -o $(ODIR)armfileIO3.o
$(ODIR)armdivmod.o: $(SDIR)armdivmod.s
as $(ODIR)armdivmod.s -o $(ODIR)armdivmod.o
|