mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-24 00:42:28 +03:00
1fa9b86b26
This is more descriptive, especially since we will eventually have macaw-aarch32 (also derived from the ASL specs)
28 lines
663 B
Makefile
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
|
|
|