website/code/cheri/Makefile
2023-01-06 03:04:10 +00:00

22 lines
471 B
Makefile

CFLAGS += -Wall -g -fno-stack-protector -O0
CC := clang
PURECAP_CC ?= ~/cheri/output/sdk/utils/cheribsd-riscv64-purecap-clang
SOURCES := $(wildcard *.c)
OBJECTS := $(patsubst %.c, %, $(SOURCES))
OBJECTS_CHERIBSD := $(patsubst %.c, %-cheribsd, $(SOURCES))
all: all-host all-cheribsd
all-host: $(OBJECTS)
all-cheribsd: $(OBJECTS_CHERIBSD)
%: %.c
$(CC) $< $(CFLAGS) -o $@
%-cheribsd: %.c
$(PURECAP_CC) $< $(CFLAGS) -o $@
clean:
rm $(OBJECTS) $(OBJECTS_CHERIBSD)