Skip to content

Instantly share code, notes, and snippets.

@sooop
Last active December 15, 2015 15:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sooop/5956d43d6c0b139f88f4 to your computer and use it in GitHub Desktop.
Save sooop/5956d43d6c0b139f88f4 to your computer and use it in GitHub Desktop.
Objective-C (Foundation) Build Script
{
"cmd": ["clang", "-ObjC", "${file}", "-fobjc-arc", "-fblocks", "-framework", "Foundation", "-o", "${file_base_name}"],
"file_regex": "^(.*?):([0-9]+):([0-9]+): (.*)",
"selector": "source.m",
"variants": [
{
"name": "Run",
"cmd": ["${file_path}/${file_base_name}"]
},
{
"name": "Compile",
"cmd" : [ "clang", "-c", "${file}", "-ObjC", "-fblocks", "-fobjc-arc"]
},
{
"cmd": ["clang", ,"-g", "-ObjC", "${file}", "-fobjc-arc", "-fblocks", "-framework", "Foundation", "-o", "${file_base_name}"],
"name" : "Build for Debug"
},
{
"name": "Analyze",
"cmd" : [ "clang", "-c", "${file}", "-ObjC", "-fobjc-arc", "-fblocks", "--analyze"]
},
{
"name" : "Link-All",
"cmd" : ["bash", "-c", "clang *.o -o ${file_path}/${file_base_name} -ObjC -fblocks, -framework Foundation -fblock"]
},
{
"name" : "Build-All",
"path" : "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/sooop/bin:",
"cmd" : ["scc"]
},
{
"name" : "Run Output",
"cmd" : ["${file_path}/${file_base_name}"]
}
]
}
{
"cmd": [
"c:/apps/clang/bin/clang.exe", "${file}", "-ObjC",
"-o", "${file_path}/${file_base_name}",
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers",
"-I" ,"C:/GNUstep/include",
"-L", "C:/GNUstep/GNUstep/System/Library/Libraries",
"-lobjc" ,
"-fobjc-default-synthesize-properties",
"-lgnustep-base",
"-fblocks"
],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.m",
"variants":
[
{
"name": "Run",
"cmd": ["${file_path}/${file_base_name}"]
},
{
"cmd": [
"c:/apps/clang/bin/clang.exe", "${file}",
"--analyze",
"-ObjC",
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers",
"-I" ,"C:/GNUstep/include",
//"-fobjc-default-synthesize-properties",
"-fblocks"
],
"name" : "Analyze"
},
{
"cmd": [
"c:/apps/clang/bin/clang.exe", "${file}",
"-c",
"-ObjC",
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers",
"-I" ,"C:/GNUstep/include",
"-fobjc-default-synthesize-properties",
"-fblocks"
],
"name" : "Compile"
},
{
"cmd" : ["c:/apps/clang/bin/clang.exe", "${file_path}/*.o" , "-o", "${file_base_name}",
"-lobjc" , "-lgnustep-base",
"-L", "C:/GNUstep/GNUstep/System/Library/Libraries"],
"name" : "Link-All"
},
{
"cmd": ["c:/apps/bin/scc.exe"],
"name" : "Build-All"
},
{
"cmd" : ["${file_path}/run.exe"],
"name" : "Run output"
},
{
"cmd" : ["cmd","/c","del", "*.o", "*.exe"],
"name" : "Clean Project"
},
{
"cmd": [
"c:/apps/clang/bin/clang.exe", "${file}", "-ObjC", "-g",
"-o", "${file_path}/${file_base_name}",
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers",
"-I" ,"C:/GNUstep/include",
"-L", "C:/GNUstep/GNUstep/System/Library/Libraries",
"-lobjc" ,
"-fobjc-default-synthesize-properties",
"-lgnustep-base",
"-fblocks"
],
"name" : "Build for Debug"
}
]
}
@sooop
Copy link
Author

sooop commented Apr 10, 2013

Objective-C.win32.sublime-build.json

using Clang 3.2 pre-compiled binary (from llvm.org) and GNUstep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment