1 # To reproduce builds on Ubuntu 16.04, install following packages:
2 # gcc-multilib-arm-linux-gnueabihf
3 # gcc-multilib-mips-linux-gnu
4 # gcc-multilib-mipsel-linux-gnu
5 # gcc-multilib-powerpc-linux-gnu
6 # gcc-multilib-powerpc64-linux-gnu
7 # gcc-multilib-s390x-linux-gnu
8 # gcc-multilib-sparc64-linux-gnu
11 example-arm_32_arm.elf \
12 example-arm_32_thumb1.elf \
13 example-arm_32_thumb2.elf \
17 CFLAGS = -fno-exceptions -Wl,--build-id=none
19 example-x86_32.elf: example.c
20 gcc -m32 $(CFLAGS) $^ -o $@
22 example-x86_64.elf: example.c
23 gcc -m64 $(CFLAGS) $^ -o $@
25 # Startup code may still be Thumb2, force entry point directly to our main
26 example-arm_32_arm.elf: example.c
27 arm-linux-gnueabihf-gcc-5 -marm -march=armv6 -Wl,--entry,main $(CFLAGS) $^ -o $@
29 # Startup code may still be ARM/Thumb2, force entry point directly to our main
30 example-arm_32_thumb1.elf: example.c
31 arm-linux-gnueabihf-gcc-5 -mthumb -march=armv6 -mfloat-abi=soft -Wl,--thumb-entry,main $(CFLAGS) $^ -o $@
34 example-arm_32_thumb2.elf: example.c
35 arm-linux-gnueabihf-gcc-5 $(CFLAGS) $^ -o $@