c64-livecoding/host/Makefile
2025-08-01 13:41:13 +02:00

29 lines
549 B
Makefile

HOST_BINARY := host.prg
BUILD_DIR := ./build
BUILD_TYPE ?= release
SRC_DIR := ./src
HOST_PRG := $(BUILD_DIR)/$(HOST_BINARY)
PREVIEW_PRG := $(BUILD_DIR)/$(PREVIEW_BINARY)
SRCS := $(shell find $(SRC_DIR) -name '*.s' -or -name '*.inc')
TOPLEVEL := source.s
ifeq ($(BUILD_TYPE), test)
TOPLEVEL := test.s
endif
CL := cl65
CLFLAGS := -u __EXEHDR__ -t c64 -C c64-asm.cfg -l $(BUILD_DIR)/host.lst -Ln $(BUILD_DIR)/host.lbl
$(HOST_PRG): $(SRCS) userprog.bin
mkdir -p $(BUILD_DIR)
$(CL) -o $@ $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)
all: $(HOST_PRG)