Skip to content

Instantly share code, notes, and snippets.

# Some pre-defined variables of make
#
# $? - updated dependencies
# $@ - target value
# $< - first dependencie
# $^ - all dependencies, seperated with space
# $* - target name without extension
#
CC = arm-linux-gnueabihf-gcc
AS = arm-linux-gnueabihf-as
arm-linux-gnueabihf-gcc -c -O2 -ggdb -Wall -fno-stack-protector -o example2.o example2.c
arm-linux-gnueabihf-as -o multiply.o multiply.s
multiply.s: Assembler messages:
multiply.s:12: Rd and Rm should be different in mla
arm-linux-gnueabihf-gcc -o example2 example2.o multiply.o
qemu-arm -L /usr/arm-linux-gnueabihf ./example2
a * b is 140
a * b + c is 143
c - a * b is -137