Skip to content

Commit 867ae5a

Browse files
authored
Make command (#35)
1 parent d948de7 commit 867ae5a

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

Build Systems/KickAssembler(C64).sublime-build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
// Build Startup (Super+Shift+B / Ctrl+Shift+B)
5656
"name": "Build Startup",
5757
"buildmode" : "build-startup",
58+
},
59+
60+
{
61+
// Make (F8)
62+
"name": "Make",
63+
"buildmode" : "make",
5864
}
5965
]
6066
}

Key Maps/Default (Windows).sublime-keymap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{ "keys": ["shift+f5"], "command": "build", "args": {"variant": "Build and Debug Startup"} },
99

1010
{ "keys": ["f7"], "command": "build", "args": {"variant": "Build and Run"} },
11-
{ "keys": ["shift+f7"], "command": "build", "args": {"variant": "Build and Debug"} }
11+
{ "keys": ["shift+f7"], "command": "build", "args": {"variant": "Build and Debug"} },
1212

13+
{ "keys": ["f8"], "command": "build", "args": {"variant": "Make"} },
1314
]

Preferences.sublime-settings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"kickass_compiled_filename": "${build_file_base_name}.prg",
88
"kickass_output_path": "bin",
99
"default_prebuild_path": "",
10-
"default_postbuild_path": ""
10+
"default_postbuild_path": "",
11+
"default_make_path": ""
1112
}

kickass_build.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ def __init__(self, settings):
140140
self.__settings = settings
141141

142142
def createCommand(self, sourceDict, buildMode):
143+
return self.createMakeCommand(sourceDict, buildMode) if buildMode=="make" else self.createKickassCommand(sourceDict, buildMode)
144+
145+
def createMakeCommand(self, sourceDict, buildMode):
146+
makeCommand = self.getRunScriptStatement("make", "default_make_path")
147+
makeCommand = makeCommand if makeCommand else "echo Make file not found. Place a file named make.%s in ${file_path}%s" % (self.getExt(), " or %s." % (self.__settings.getSetting("default_make_path")) if self.__settings.getSetting("default_make_path") else ".")
148+
return KickAssCommand(makeCommand, True, False, buildMode)
149+
150+
def createKickassCommand(self, sourceDict, buildMode):
143151
javaCommand = "java -cp \"${kickass_jar_path}\"" if self.__settings.getSetting("kickass_jar_path") else "java"
144152
compileCommand = javaCommand+" cml.kickass.KickAssembler \"${build_file_base_name}.${file_extension}\" -log \"${kickass_output_path}/${build_file_base_name}_BuildLog.txt\" -o \"${kickass_output_path}/${kickass_compiled_filename}\" -vicesymbols -showmem -symbolfiledir ${kickass_output_path} ${kickass_args}"
145153
compileDebugCommandAdd = "-afo :afo=true :usebin=true"

0 commit comments

Comments
 (0)