2
0
Fork 0

Added basic build system

This commit is contained in:
Willem 2018-11-29 22:18:47 +01:00
parent 11eef7bd83
commit b3f6e6d954
8 changed files with 596 additions and 31 deletions

36
build/env.inc.mk Normal file
View file

@ -0,0 +1,36 @@
# Fill in all paths
PATH_SRC ?= src
PATH_BIN ?= bin
PATH_HEX2BIN ?= /usr/bin
PATH_SDCC ?= /usr/bin
PATH_CURRENT ?= $(dir $(lastword $(MAKEFILE_LIST)))
# Build tools
H2B ?= $(PATH_HEX2BIN)/hex2bin
SDCC ?= $(PATH_SDCC)/sdcc
SDASM ?= $(PATH_SDCC)/sdasz80
SDAR ?= $(PATH_SDCC)/sdar
SDCC_FLAG_CPU ?= -mz80
SDCC_FLAG_LD ?= --nostdinc
SDASM_FLAGS ?= -g -l -c -o
SDAR_FLAGS ?= -rc
# OS cmds
ifeq ($(OS),Windows_NT)
RM = del /F /Q
RMDIR = -RMDIR /S /Q
MKDIR = -mkdir
ERRIGNORE = 2>NUL || true
SEP=\\
else
RM = rm -rf
RMDIR = rm -rf
MKDIR = mkdir -p
ERRIGNORE = 2>/dev/null
SEP=/
endif
# Remove space after separator
PSEP = $(strip $(SEP))

View file

@ -0,0 +1,9 @@
# Local env included makefile
# This file should be ignored in version control
# note: the ?= is so you can override those again in cmdline.
#
# Change to local installations.
#PATH_SDCC ?= /usr/bin
#PATH_HEX2BIN ?= /usr/bin