copy/Makefile

71 lines
1.4 KiB
Makefile
Raw Normal View History

2018-10-08 05:07:48 +00:00
# Builds copy command
# Requirements:
# 1. Gmake must be used.
# 2. The cc65 compiler must be properly setup.
ifndef CC65_TARGET
CC65_TARGET:=apple2enh
2018-05-14 04:02:01 +00:00
endif
2018-11-13 02:27:27 +00:00
ifeq ($(OS),Windows_NT)
ifndef MERLIN_DIR
MERLIN_DIR=C:/opt/Merlin32_v1.0
endif
MERLIN_LIB=$(MERLIN_DIR)/Library
MERLIN=$(MERLIN_DIR)/Windows/Merlin32
COPY=copy
APPLEWIN="c:\opt\AppleWin1.26.2.3\applewin.exe"
else
ifndef MERLIN_DIR
MERLIN_DIR=$(HOME)/opt/Merlin32_v1.0
endif
MERLIN_LIB=$(MERLIN_DIR)/Library
MERLIN=$(MERLIN_DIR)/Linux64/Merlin32
COPY=cp
APPLEWIN=applewin
endif
2018-10-08 05:07:48 +00:00
CC=cl65
AS=ca65
2018-11-13 02:27:27 +00:00
OBJS=copy.o cui.o prodos.o prodosext.o libgen.o
HDRS=cui.h prodos.h prodosext.h libgen.h
2018-10-08 05:07:48 +00:00
CFLAGS=-O -t $(CC65_TARGET) -DTRACE
# The -S $6000 makes the start address $6000 so that both hi-res
# pages are available.
LDFLAGS=-t $(CC65_TARGET)
2018-09-25 05:13:19 +00:00
PGM=copy
2018-10-08 05:07:48 +00:00
DISK_VOL=$(PGM)
DISK=$(PGM).dsk
AC=java -jar AppleCommander-ac-1.4.0.jar
# Extra stuff
BASIC_AUX_TYPE=0x0801
READ_TIME_LOAD_ADDR=0x0260
SYS_LOAD_ADDR=0x2000
BIN_LOAD_ADDR=0x0803
########################################
all: $(DISK)
2018-05-14 04:02:01 +00:00
2018-11-13 02:27:27 +00:00
$(DISK): $(PGM) libgentest
2018-10-08 05:07:48 +00:00
$(RM) $(DISK)
$(AC) -pro140 $(DISK) $(DISK_VOL)
$(AC) -as $(DISK) $(PGM) BIN < $(PGM)
2018-11-13 02:27:27 +00:00
$(AC) -as $(DISK) libgentest BIN < libgentest
2018-05-14 04:02:01 +00:00
2018-10-08 05:07:48 +00:00
$(PGM): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^
2018-05-14 04:02:01 +00:00
2018-11-13 02:27:27 +00:00
libgentest: libgen.o libgentest.o
$(CC) $(LDFLAGS) -o $@ $^
test: $(DISK)
$(APPLEWIN) -d1 $(DISK)
#$(APPLEWIN) -s7 empty -d1 $(DISK)
2018-05-14 04:02:01 +00:00
clean:
2018-10-08 05:07:48 +00:00
$(RM) *.o $(PGM) $(DISK)
2018-05-14 04:02:01 +00:00