-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 1.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2020 Xander Soldaat <[email protected]>
#
# This Makefile makes it easy to compile a project with x88dk.
# Ensure Z88DK_HOME is set for your installation.
# Change this to the name of the project you want to build.
# This will create a .COM
PROJECT=skelcave
# Set the path to your z88dk home folder
Z88DK_HOME=/usr/local/share/z88dk
Z88DK_BIN=$(Z88DK_HOME)/bin
CC=$(Z88DK_BIN)/zcc
# This is currently configred to work on the RC2014 based RC126 board, running CP/M 3.x
# Refer to the z88dk documentation to change to suit your own system
CFLAGS=+rc2014 -subtype=cpm -mz180 -vn -create-app -Iinclude -SO3 -clib=new --lstcwd
all: $(PROJECT)
$(PROJECT): build/$(PROJECT).lst
@echo -n Building $@:
@$(CC) $(CFLAGS) @$< -o build/$(PROJECT)
@cp build/$(PROJECT).bin build/$(PROJECT).com
@echo "\t\tdone."
build/$(PROJECT).lst:
@echo -n Creating $@:
@test -d build || mkdir build
@ls -c1 src/*.c > $@
@echo "\tdone."
clean:
@echo -n Cleaning build files:
@rm -f build/*
@echo "\t\tdone."
distclean:
@echo -n Cleaning build/ \& zcc_opt.def:
@rm -rf build/ zcc_opt.def
@echo "\tdone."
.PHONY: build/$(PROJECT).lst