/Foundation/Jakefile
http://github.com/cacaodev/cappuccino · #! · 68 lines · 57 code · 11 blank · 0 comment · 0 complexity · 92e3b80ffa7dbee89584eb0c7576e916 MD5 · raw file
- /*
- * Jakefile
- * Foundation
- *
- * Created by Francisco Tolmasky.
- * Copyright 2009, 280 North, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
- require("../common.jake");
- var framework = require("objective-j/jake").framework;
- var BundleTask = require("objective-j/jake").BundleTask;
- foundationTask = framework ("Foundation", function(foundationTask)
- {
- foundationTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "Foundation.build", $CONFIGURATION))
- foundationTask.setBuildPath($BUILD_CONFIGURATION_DIR);
- foundationTask.setAuthor("280 North, Inc.");
- foundationTask.setEmail("feedback @nospam@ 280north.com");
- foundationTask.setSummary("Foundation classes for Cappuccino");
- foundationTask.setIdentifier("com.280n.Foundation");
- foundationTask.setVersion(getCappuccinoVersion());
- foundationTask.setLicense(BundleTask.License.LGPL_v2_1);
- foundationTask.setSources(new FileList("**/*.j"));
- foundationTask.setResources(new FileList("Resources/**/*"));
- foundationTask.setFlattensSources(true);
- foundationTask.setInfoPlistPath("Info.plist");
- foundationTask.setEnvironments(require("objective-j/jake/environment").ObjJ);
- // Grab all the .h's and just include them in each file.
- var INCLUDES = new FileList("**/*.h").map(function(aFilename)
- {
- return "--include \"" + aFilename + "\"";
- }).join(" ");
- INCLUDES = "--include \"../AppKit/Platform/Platform.h\" " + INCLUDES;
- if ($CONFIGURATION === "Release")
- foundationTask.setCompilerFlags("-O " + INCLUDES);
- else
- foundationTask.setCompilerFlags("-DDEBUG -g " + INCLUDES);
- });
- $BUILD_CJS_FOUNDATION = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "Foundation");
- filedir ($BUILD_CJS_FOUNDATION, ["Foundation"], function()
- {
- cp_r(foundationTask.buildProductPath(), $BUILD_CJS_FOUNDATION);
- });
- task ("build", ["Foundation", $BUILD_CJS_FOUNDATION]);
- CLOBBER.include($BUILD_CJS_FOUNDATION);