From 64e9daf02e77bc82049fb50ba8fa83f7a7e024d7 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Tue, 8 Sep 2015 11:33:43 +0000 Subject: add makefile for linux on the ARM --- Makefile.linux_arm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Makefile.linux_arm (limited to 'Makefile.linux_arm') diff --git a/Makefile.linux_arm b/Makefile.linux_arm new file mode 100644 index 0000000..1edb990 --- /dev/null +++ b/Makefile.linux_arm @@ -0,0 +1,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 + -- cgit v1.2.3