30 lines
777 B
Makefile
30 lines
777 B
Makefile
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
CMOC ?= cmoc
|
|
PERL ?= perl
|
|
WRITECOCOFILE ?= writecocofile
|
|
VCC_CONFIGURATION ?= Debug
|
|
|
|
.PHONY: all disk clean
|
|
all: disk
|
|
disk: EVIDENCE.dsk
|
|
|
|
obj/main.o: main.c Makefile
|
|
@mkdir -p obj
|
|
ifeq ($(VCC_CONFIGURATION),Fail)
|
|
@printf 'main.c:1: warning: authored warning before the real error\n'
|
|
"$(CMOC)" --coco -O0 --intermediate --intdir=obj -c -o $@ missing.c
|
|
else
|
|
"$(CMOC)" --coco -O0 -fno-omit-frame-pointer --intermediate --intdir=obj -c -o $@ $<
|
|
endif
|
|
|
|
EVIDENCE.BIN: obj/main.o
|
|
"$(CMOC)" --coco --intermediate --org=2800 --limit=7800 -o $@ $<
|
|
|
|
EVIDENCE.dsk: EVIDENCE.BIN
|
|
$(PERL) -e 'print chr(255) x (35*18*256)' > $@
|
|
$(WRITECOCOFILE) $@ EVIDENCE.BIN
|
|
|
|
clean:
|
|
rm -rf obj
|
|
rm -f EVIDENCE.BIN EVIDENCE.map EVIDENCE.link EVIDENCE.dsk
|