Files

50 lines
1.3 KiB
Makefile

# Generated by VCC Plus — edit Project Settings to regenerate.
# Ordinary GNU Make; no VCC Plus project parser is required to build it.
CMOC ?= cmoc
PERL ?= perl
WRITECOCOFILE ?= writecocofile
INSTALL_LOADER ?= install-coco-boot-loader
VCC_CONFIGURATION ?= Debug
ifeq ($(VCC_CONFIGURATION),Release)
OPTIM ?= -O2
else
OPTIM ?= -O0
DEBUG_FRAME ?= -fno-omit-frame-pointer
endif
define VCC_DEFINES
endef
define VCC_COMPILER_OPTIONS
endef
define VCC_LINKER_OPTIONS
endef
export VCC_CMOC_COMPAT = 1
CPPFLAGS += $(VCC_DEFINES)
CFLAGS += --coco --intermediate --deps --stack-space=2048 $(OPTIM) $(DEBUG_FRAME) $(VCC_COMPILER_OPTIONS)
LDFLAGS += --coco --intermediate --org=2800 $(VCC_LINKER_OPTIONS)
LDLIBS += -lssc -lorch90 -lbcontrol -lvcccompat
OBJECTS := obj/main.o
.PHONY: all build clean disk libraries
all: build
build: LANDER.bin
LANDER.bin: $(OBJECTS) Makefile
@mkdir -p $(dir $@)
"$(CMOC)" $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
obj/main.o: main.c Makefile
@mkdir -p $(dir $@)
"$(CMOC)" $(CPPFLAGS) $(CFLAGS) --intdir=$(dir $@) -c -o $@ $<
disk: LANDER.dsk
LANDER.dsk: LANDER.bin Makefile
@mkdir -p $(dir $@)
$(PERL) -e 'print chr(255) x (35*18*256)' > $@
$(WRITECOCOFILE) $@ LANDER.bin
clean:
rm -rf obj
rm -f LANDER.bin LANDER.map LANDER.link LANDER.dsk
-include $(OBJECTS:.o=.d)