mirror of
https://github.com/a2stuff/basys33.git
synced 2024-12-22 03:29:42 +00:00
Revamp package script, build to out/ dir
This commit is contained in:
parent
c84001002b
commit
aed0c0a6d4
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Output directory
|
||||||
|
out
|
21
Makefile
21
Makefile
@ -2,20 +2,27 @@
|
|||||||
CAFLAGS = --target apple2enh --list-bytes 0
|
CAFLAGS = --target apple2enh --list-bytes 0
|
||||||
LDFLAGS = --config apple2-asm.cfg
|
LDFLAGS = --config apple2-asm.cfg
|
||||||
|
|
||||||
TARGETS = basis.system.SYS
|
OUTDIR = out
|
||||||
|
|
||||||
.PHONY: clean all
|
|
||||||
all: $(TARGETS)
|
|
||||||
|
|
||||||
HEADERS = $(wildcard *.inc)
|
HEADERS = $(wildcard *.inc)
|
||||||
|
|
||||||
|
TARGETS = \
|
||||||
|
$(OUTDIR)/basis.system.SYS
|
||||||
|
|
||||||
|
.PHONY: clean all
|
||||||
|
all: $(OUTDIR) $(TARGETS)
|
||||||
|
|
||||||
|
$(OUTDIR):
|
||||||
|
mkdir -p $(OUTDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o
|
rm -f $(OUTDIR)/*.o
|
||||||
|
rm -f $(OUTDIR)/*.list
|
||||||
rm -f $(TARGETS)
|
rm -f $(TARGETS)
|
||||||
|
|
||||||
%.o: %.s $(HEADERS)
|
$(OUTDIR)/%.o: %.s $(HEADERS)
|
||||||
ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||||
|
|
||||||
%.SYS: %.o
|
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
||||||
ld65 $(LDFLAGS) -o $@ $<
|
ld65 $(LDFLAGS) -o $@ $<
|
||||||
xattr -wx prodos.AuxType '00 20' $@
|
xattr -wx prodos.AuxType '00 20' $@
|
||||||
|
20
package.sh
20
package.sh
@ -5,14 +5,20 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
IMGFILE="basys33.po"
|
PACKDIR=$(mktemp -d)
|
||||||
|
IMGFILE="out/basys33.po"
|
||||||
VOLNAME="basys33"
|
VOLNAME="basys33"
|
||||||
|
|
||||||
# Create a new disk image.
|
|
||||||
|
|
||||||
rm -f "$IMGFILE"
|
rm -f "$IMGFILE"
|
||||||
cadius CREATEVOLUME "$IMGFILE" "$VOLNAME" 140KB --quiet --no-case-bits
|
cadius CREATEVOLUME "$IMGFILE" "$VOLNAME" 140KB --no-case-bits --quiet
|
||||||
|
|
||||||
cp "basis.system.SYS" "basis.system#FF0000"
|
add_file () {
|
||||||
cadius ADDFILE "$IMGFILE" "/$VOLNAME" "basis.system#FF0000" --quiet --no-case-bits
|
cp "$1" "$PACKDIR/$2"
|
||||||
rm -f "basis.system#FF0000"
|
cadius ADDFILE "$IMGFILE" "/$VOLNAME" "$PACKDIR/$2" --no-case-bits --quiet
|
||||||
|
}
|
||||||
|
|
||||||
|
add_file "out/basis.system.SYS" "basis.system#FF0000"
|
||||||
|
|
||||||
|
rm -r "$PACKDIR"
|
||||||
|
|
||||||
|
cadius CATALOG "$IMGFILE"
|
||||||
|
Loading…
Reference in New Issue
Block a user