We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a27abac commit 68ac937Copy full SHA for 68ac937
example4/Makefile
@@ -0,0 +1,23 @@
1
+CC = arm-linux-gnueabihf-gcc
2
+CFLAGS = -O2 -ggdb -Wall
3
+LDFLAGS = -fno-stack-protector
4
+
5
+objects = example4.o
6
7
+default: example4
8
9
+.PHONY: default clean
10
11
+example4: $(objects)
12
+ $(CC) -o $@ $^
13
14
+example4.o: example4.c
15
16
+%.o: %.c
17
+ $(CC) -c $(CFLAGS) $(LDFLAGS) -o $@ $<
18
19
+clean:
20
+ rm -f $(objects) example4
21
22
+qemu: example4
23
+ qemu-arm -L /usr/arm-linux-gnueabihf ./example4
example4/example4.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+int multiply(int a, int b);
+int main(void)
+{
+ int a, b, d;
+ a = 221412523;
+ b = 3;
+ d = multiply(a,b);
+ printf("a * b is %d\n", d);
+ return 0;
+}
+int multiply(int a, int b)
+ return (a*b);
0 commit comments