Adopt new build environment.

This commit is contained in:
Jeremy Rand 2014-09-09 23:05:58 -04:00
parent 81d536728d
commit e1384a39fa
20 changed files with 2878 additions and 26 deletions

View File

@ -0,0 +1,203 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXFileReference section */
70E84C2E19B10B3100159159 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
9D667FA119BFF5BC00717163 /* a2e.hi.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = a2e.hi.s; sourceTree = "<group>"; };
9D667FA219BFF5BC00717163 /* curta.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = curta.c; sourceTree = "<group>"; };
9D667FA319BFF5BC00717163 /* curtaModel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = curtaModel.c; sourceTree = "<group>"; };
9D667FA419BFF5BC00717163 /* curtaModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = curtaModel.h; sourceTree = "<group>"; };
9D667FA519BFF5BC00717163 /* curtaUI.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = curtaUI.c; sourceTree = "<group>"; };
9D667FA619BFF5BC00717163 /* curtaUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = curtaUI.h; sourceTree = "<group>"; };
9D667FA719BFF5BC00717163 /* joystick.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = joystick.c; sourceTree = "<group>"; };
9D667FA819BFF5BC00717163 /* joystick.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = joystick.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
70E84C2319B10B0500159159 = {
isa = PBXGroup;
children = (
70E84C2E19B10B3100159159 /* Makefile */,
9D667FA119BFF5BC00717163 /* a2e.hi.s */,
9D667FA219BFF5BC00717163 /* curta.c */,
9D667FA319BFF5BC00717163 /* curtaModel.c */,
9D667FA419BFF5BC00717163 /* curtaModel.h */,
9D667FA519BFF5BC00717163 /* curtaUI.c */,
9D667FA619BFF5BC00717163 /* curtaUI.h */,
9D667FA719BFF5BC00717163 /* joystick.c */,
9D667FA819BFF5BC00717163 /* joystick.h */,
);
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
70E84C2819B10B0600159159 /* CurtaSim */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION)";
buildConfigurationList = 70E84C2B19B10B0600159159 /* Build configuration list for PBXLegacyTarget "CurtaSim" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
dependencies = (
);
name = CurtaSim;
passBuildSettingsInEnvironment = 1;
productName = Apple2BuildPipelineSample;
};
/* End PBXLegacyTarget section */
/* Begin PBXProject section */
70E84C2419B10B0500159159 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0600;
ORGANIZATIONNAME = "One Girl, One Laptop Productions";
TargetAttributes = {
70E84C2819B10B0600159159 = {
CreatedOnToolsVersion = 6.0;
};
};
};
buildConfigurationList = 70E84C2719B10B0500159159 /* Build configuration list for PBXProject "CurtaSim" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 70E84C2319B10B0500159159;
projectDirPath = "";
projectRoot = "";
targets = (
70E84C2819B10B0600159159 /* CurtaSim */,
);
};
/* End PBXProject section */
/* Begin XCBuildConfiguration section */
70E84C2919B10B0600159159 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
70E84C2A19B10B0600159159 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
70E84C2C19B10B0600159159 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUGGING_SYMBOLS = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
70E84C2D19B10B0600159159 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
70E84C2719B10B0500159159 /* Build configuration list for PBXProject "CurtaSim" */ = {
isa = XCConfigurationList;
buildConfigurations = (
70E84C2919B10B0600159159 /* Debug */,
70E84C2A19B10B0600159159 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
70E84C2B19B10B0600159159 /* Build configuration list for PBXLegacyTarget "CurtaSim" */ = {
isa = XCConfigurationList;
buildConfigurations = (
70E84C2C19B10B0600159159 /* Debug */,
70E84C2D19B10B0600159159 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 70E84C2419B10B0500159159 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:CurtaSim.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>1FF8E5B6-1315-475A-9CD0-FCCF194EDB92</string>
<key>IDESourceControlProjectName</key>
<string>Apple2BuildPipelineSample</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>1DDA97CB96411CB4840C13C24A3B935FA4FF778E</key>
<string>https://github.com/blondie7575/Apple2BuildPipeline</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>Apple2BuildPipelineSample/Apple2BuildPipelineSample.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>1DDA97CB96411CB4840C13C24A3B935FA4FF778E</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/blondie7575/Apple2BuildPipeline</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>1DDA97CB96411CB4840C13C24A3B935FA4FF778E</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>1DDA97CB96411CB4840C13C24A3B935FA4FF778E</string>
<key>IDESourceControlWCCName</key>
<string>Apple2BuildPipeline</string>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>6B9C2644-83DD-4B4D-9E1E-015442DD4FB5</string>
<key>IDESourceControlProjectName</key>
<string>CurtaSim</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</key>
<string>https://github.com/jeremysrand/CurtaSim.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>CurtaSim.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</key>
<string>../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/jeremysrand/CurtaSim.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</string>
<key>IDESourceControlWCCName</key>
<string>CurtaSim</string>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>BC5C2592-EDC5-4CC6-8983-25077B52C04F</string>
<key>IDESourceControlProjectName</key>
<string>TempName</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</key>
<string>https://github.com/jeremysrand/CurtaSim.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>TempName.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</key>
<string>../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/jeremysrand/CurtaSim.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>F5E5AB1BBAA08E463D2E8ED01DEEF2E6239A1F73</string>
<key>IDESourceControlWCCName</key>
<string>CurtaSim</string>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
<true/>
<key>SnapshotAutomaticallyBeforeSignificantChanges</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "70E84C2819B10B0600159159"
BuildableName = "CurtaSim"
BlueprintName = "CurtaSim"
ReferencedContainer = "container:CurtaSim.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "70E84C2819B10B0600159159"
BuildableName = "Apple2BuildPipelineSample"
BlueprintName = "Apple2BuildPipelineSample"
ReferencedContainer = "container:Apple2BuildPipelineSample.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Apple2BuildPipelineSample.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>70E84C2819B10B0600159159</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

BIN
DevApple.vii Normal file

Binary file not shown.

107
Makefile
View File

@ -1,37 +1,92 @@
BIN=curta.bin
SYS=curta.system.sys
#
# Makefile
# Apple2BuildPipelineSample
#
# Part of a sample build pipeline for Apple ][ software development
#
# Created by Quinn Dunki on 8/15/14.
# One Girl, One Laptop Productions
# http://www.quinndunki.com
# http://www.quinndunki.com/blondihacks
#
INSTALL_DIR=~/Documents/"Apple ]["/Transfer
include make/head.mk
GEN_ASM=a2e.hi.s
SRCS=$(wildcard *.c)
ASM=$(filter-out $(GEN_ASM),$(wildcard *.s)) $(GEN_ASM)
# Customize this file to control what gets built, what machines to
# target, where in memory to put it, etc.
C_OBJS=$(SRCS:.c=.o)
ASM_OBJS=$(ASM:.s=.o)
OBJS=$(C_OBJS) $(ASM_OBJS)
# The name of your system or binary file to build goes here:
PGM=curta
PLATFORM=apple2
PLATFORM_CFG=--start-addr '$$4000'
# Set the config you are building for. See these pages for details:
# http://cc65.github.io/cc65/doc/apple2.html#s4
# http://cc65.github.io/cc65/doc/apple2enh.html#s4
#
# Uncomment the one you want below (the first one is the default):
# MACHINE = apple2
# MACHINE = apple2-dos33
# MACHINE = apple2-system
# MACHINE = apple2-loader
# MACHINE = apple2-reboot
# MACHINE = apple2enh
# MACHINE = apple2enh-dos33
# MACHINE = apple2enh-system
# MACHINE = apple2enh-loader
# MACHINE = apple2enh-reboot
MACHINE = apple2-loader
MAPFILE=curta.map
# Uncomment and set this to your starting address in Apple ][ memory
# if necessary:
# START_ADDR = 6000
START_ADDR=4000
all: $(BIN)
# Set the default CPU to assemble for. You can change this in the
# body of a .s file using control commands like ".PC02". Uncomment
# the one you want below (the first one is the default):
# CPU = 6502
# CPU = 65SC02
# CPU = 65C02
# CPU = 65816
# Note: You can assemble for 65816 in 16-bit mode but the C compiler
# will only produce 8-bit code.
a2e.hi.s:
co65 --code-label _a2e_hi -o $@ $(CC65_HOME)/tgi/a2e.hi.tgi
# Any *.c files in your main project directory will automatically be
# built. But, if you have subdirectories with C files in them, you
# should add them to the list of C_SRCS to build. Do that by
# uncommenting the following line and changing "someSubDir" to match
# the subdirectory you have created. Add multiple lines like this
# for each subdirectory:
# C_SRCS += $(wildcard someSubDir/*.c)
%.o: %.s
ca65 -t $(PLATFORM) -o $@ $<
# Any *.s files in your main project directory will automatically be
# built. But, if you have subdirectories with assembly files in them,
# you should add them to the list of ASM_SRCS to build. Do that by
# uncommenting the following line and changing "someSubDir" to match
# the subdirectory you have created. Add multiple lines like this
# for each subdirectory:
# ASM_SRCS += $(wildcard someSubDir/*.s)
$(BIN): $(ASM_OBJS) $(SRCS)
cl65 -t $(PLATFORM) $(PLATFORM_CFG) --mapfile $(MAPFILE) -o $(BIN).tmp $(SRCS) $(addprefix --obj ,$(ASM_OBJS))
dd if=$(BIN).tmp of=$(BIN) bs=4 skip=1
rm -f $(BIN).tmp
# If you have a non-standard cc65 install, you may need to change
# some of these. Uncomment the following line and change it to the
# correct path to CC65_HOME if the default is not correct:
# export CC65_HOME := /usr/local/lib/cc65
#
# If the path to the cc65 binaries is not correct, uncomment this
# line and change it:
# CC65_BIN = /usr/local/bin
clean:
rm -f $(BIN) $(OBJS) $(GEN_ASM) $(MAPFILE)
# If you want to add arguments to the compile commandline, add them
# to this variable:
# CFLAGS += -Os
install: $(BIN)
cp $(BIN) $(INSTALL_DIR)
cp $(SYS) $(INSTALL_DIR)
# If you want to add arguments to the assembly commandline, add them
# to this variable:
# ASMFLAGS += -g
# If you want to add arguments to the link commandline, add them to
# this variable:
# LDFLAGS += -v
# Do not change anything else below here...
include make/tail.mk

2096
a2e.hi.s Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

BIN
make/AppleCommander.jar Normal file

Binary file not shown.

BIN
make/V2Make.scpt Normal file

Binary file not shown.

158
make/createDiskImage Executable file
View File

@ -0,0 +1,158 @@
#!/bin/sh
if [ $# -lt 4 ]
then
echo USAGE: $0 '<AppleCommander> <machine> <diskimage> <binary>'
exit 1
fi
APPLECOMMANDER=$1
MACHINE=$2
DISKIMAGE=$3
PROGRAM=$4
if [ ! -f "$PROGRAM" ]
then
echo "Cannot file executable $PROGRAM"
exit 1
fi
case "$MACHINE" in
apple2)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
apple2enh)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
apple2-dos33)
TEMPLATE="make/dos33_template.dsk"
DELETELOADER=0
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
apple2enh-dos33)
TEMPLATE="make/dos33_template.dsk"
DELETELOADER=0
RENAMELOADER=0
DELETEBASIC=0
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
apple2-system)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=1
HASHEADER=0
FILETYPE="sys"
TARGETFILE=`basename $PROGRAM`.system
;;
apple2enh-system)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=1
RENAMELOADER=0
DELETEBASIC=1
HASHEADER=0
FILETYPE="sys"
TARGETFILE=`basename $PROGRAM`.system
;;
apple2-loader)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
apple2-reboot)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
apple2enh-loader)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
apple2enh-reboot)
TEMPLATE="make/prodos_template.dsk"
DELETELOADER=0
RENAMELOADER=1
DELETEBASIC=1
HASHEADER=1
FILETYPE="bin"
TARGETFILE=`basename $PROGRAM`
;;
*)
echo "Invalid machine type $MACHINE"
exit 1
;;
esac
if [ ! -f "$TEMPLATE" ]
then
echo "Cannot file template disk image $TEMPLATE"
exit 1
fi
cp "$TEMPLATE" "$DISKIMAGE"
if [ $DELETELOADER -eq 1 ]
then
java -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM
fi
if [ $RENAMELOADER -eq 1 ]
then
java -jar "$APPLECOMMANDER" -e "$DISKIMAGE" LOADER.SYSTEM | java -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE".system sys
java -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM
fi
if [ $DELETEBASIC -eq 1 ]
then
java -jar "$APPLECOMMANDER" -d "$DISKIMAGE" BASIC.SYSTEM
fi
if [ $HASHEADER -eq 1 ]
then
STARTADDR=`od -t x2 -N 2 < "$PROGRAM" | head -1 | awk '{print $2}'`
dd if="$PROGRAM" bs=4 skip=1 | java -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE 0x$STARTADDR
else
java -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE" $FILETYPE < "$PROGRAM"
fi

BIN
make/dos33_template.dsk Normal file

Binary file not shown.

30
make/head.mk Normal file
View File

@ -0,0 +1,30 @@
#
# head.mk
# Apple2BuildPipelineSample
#
# Part of a sample build pipeline for Apple ][ software development
#
# Created by Quinn Dunki on 8/15/14.
# One Girl, One Laptop Productions
# http://www.quinndunki.com
# http://www.quinndunki.com/blondihacks
#
export CC65_HOME := /usr/local/lib/cc65
CC65_BIN = /usr/local/bin
CL65=$(CC65_BIN)/cl65
CA65=$(CC65_BIN)/ca65
CC65=$(CC65_BIN)/cc65
AC=make/AppleCommander.jar
C_SRCS=$(wildcard *.c)
ASM_SRCS=$(wildcard *.s)
MACHINE=apple2
CPU=6502
CFLAGS=
ASMFLAGS=
LDFLAGS=

BIN
make/prodos_template.dsk Normal file

Binary file not shown.

80
make/tail.mk Normal file
View File

@ -0,0 +1,80 @@
#
# tail.mk
# Apple2BuildPipelineSample
#
# Part of a sample build pipeline for Apple ][ software development
#
# Created by Quinn Dunki on 8/15/14.
# One Girl, One Laptop Productions
# http://www.quinndunki.com
# http://www.quinndunki.com/blondihacks
#
export PATH := $(PATH):$(CC65_BIN)
C_OBJS=$(C_SRCS:.c=.o)
C_DEPS=$(C_SRCS:.c=.u)
ASM_OBJS=$(ASM_SRCS:.s=.o)
ASM_LSTS=$(ASM_SRCS:.s=.lst)
OBJS=$(C_OBJS) $(ASM_OBJS)
MAPFILE=$(PGM).map
DISKIMAGE=$(PGM).dsk
LINK_ARGS=
EXECCMD=
ifneq ($(START_ADDR),)
# If the MACHINE is set to an option which does not support a variable start
# address, then error.
ifneq ($(filter $(MACHINE), apple2-system apple2enh-system),)
$(error You cannot change start address with this machine type)
endif
LDFLAGS += --start-addr 0x$(START_ADDR)
endif
ifneq ($(filter $(MACHINE), apple2 apple2enh apple2-dos33 apple2enh-dos33),)
EXECCMD=$(shell echo brun $(PGM) | tr '[a-z]' '[A-Z]')
endif
MACHCONFIG= -t apple2
ifneq ($(filter $(MACHINE), apple2enh apple2apple2enh-dos33 apple2enh-system apple2enh-loader apple2enh-reboot),)
MACHCONFIG= -t apple2enh
endif
ifeq ($(filter $(MACHINE), apple2 apple2enh),)
MACHCONFIG += -C $(MACHINE).cfg
endif
.PHONY: all execute clean
all: execute
clean:
rm -f $(PGM)
rm -f $(OBJS)
rm -f $(C_DEPS)
rm -f $(MAPFILE)
rm -f $(ASM_LSTS)
rm -f $(DISKIMAGE)
$(PGM): $(OBJS)
$(CL65) $(MACHCONFIG) --mapfile $(MAPFILE) $(LDFLAGS) -o $(PGM) $(OBJS)
$(DISKIMAGE): $(PGM)
make/createDiskImage $(AC) $(MACHINE) $(DISKIMAGE) $(PGM)
execute: $(DISKIMAGE)
osascript make/V2Make.scpt $(PROJECT_DIR) $(PGM) $(PROJECT_DIR)/DevApple.vii "$(EXECCMD)"
%.o: %.c
$(CL65) $(MACHCONFIG) $(CFLAGS) --create-dep -c -o $@ $<
sed -i .bak 's/\.s:/.o:/' $(@:.o=.u)
rm -f $(@:.o=.u).bak
%.o: %.s
$(CL65) $(MACHCONFIG) --cpu $(CPU) $(ASMFLAGS) -l -c -o $@ $<
-include $(C_DEPS)