Added basic build system
This commit is contained in:
parent
11eef7bd83
commit
b3f6e6d954
8 changed files with 596 additions and 31 deletions
36
build/env.inc.mk
Normal file
36
build/env.inc.mk
Normal 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))
|
||||
9
build/local.inc.mk-template
Normal file
9
build/local.inc.mk-template
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue