37 lines
653 B
Makefile
37 lines
653 B
Makefile
|
|
# 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))
|