summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn van Groningen2015-09-08 11:33:43 +0000
committerJohn van Groningen2015-09-08 11:33:43 +0000
commit64e9daf02e77bc82049fb50ba8fa83f7a7e024d7 (patch)
tree01598f084ff8d47086ac689ecef1c5adea2f963a
parentfix armap.s include (diff)
add makefile for linux on the ARM
-rw-r--r--Makefile.linux_arm30
1 files changed, 30 insertions, 0 deletions
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
+