macaw/macaw-aarch32/tests/arm/Makefile
Tristan Ravitch 1fa9b86b26 Rename macaw-asl to macaw-aarch32
This is more descriptive, especially since we will eventually have
macaw-aarch32 (also derived from the ASL specs)
2020-04-05 15:16:39 -07:00

28 lines
663 B
Makefile

# n.b. nix packages for this arm gcc and related:
# pkgsCross.arm-embedded.buildPackages.gcc
CCPROG != for X in arm-linux-gnueabi-gcc arm-none-eabi-gcc gcc ; do if type $$X > /dev/null 2>&1 ; then echo $$X; break; fi; done
A32CC := $(CCPROG)
T32CC := $(CCPROG) -mthumb
all: $(patsubst %.c,%-a32.exe,$(wildcard *.c)) $(patsubst %.c,%-t32.exe,$(wildcard *.c))
%-a32.exe: %-a32.s
$(A32CC) -fno-stack-protector -nostdlib $< -o $@
%-t32.exe: %-t32.s
$(T32CC) -fno-stack-protector -nostdlib $< -o $@
%-a32.s: %.c
$(A32CC) -fno-stack-protector -S -c $< -o $@
%-t32.s: %.c
$(T32CC) -fno-stack-protector -S -c $< -o $@
.PRECIOUS: %.s
clean:
rm *.s *.exe