/Foundation/Jakefile

http://github.com/cacaodev/cappuccino · #! · 68 lines · 57 code · 11 blank · 0 comment · 0 complexity · 92e3b80ffa7dbee89584eb0c7576e916 MD5 · raw file

  1. /*
  2. * Jakefile
  3. * Foundation
  4. *
  5. * Created by Francisco Tolmasky.
  6. * Copyright 2009, 280 North, Inc.
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2.1 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with this library; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. require("../common.jake");
  23. var framework = require("objective-j/jake").framework;
  24. var BundleTask = require("objective-j/jake").BundleTask;
  25. foundationTask = framework ("Foundation", function(foundationTask)
  26. {
  27. foundationTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "Foundation.build", $CONFIGURATION))
  28. foundationTask.setBuildPath($BUILD_CONFIGURATION_DIR);
  29. foundationTask.setAuthor("280 North, Inc.");
  30. foundationTask.setEmail("feedback @nospam@ 280north.com");
  31. foundationTask.setSummary("Foundation classes for Cappuccino");
  32. foundationTask.setIdentifier("com.280n.Foundation");
  33. foundationTask.setVersion(getCappuccinoVersion());
  34. foundationTask.setLicense(BundleTask.License.LGPL_v2_1);
  35. foundationTask.setSources(new FileList("**/*.j"));
  36. foundationTask.setResources(new FileList("Resources/**/*"));
  37. foundationTask.setFlattensSources(true);
  38. foundationTask.setInfoPlistPath("Info.plist");
  39. foundationTask.setEnvironments(require("objective-j/jake/environment").ObjJ);
  40. // Grab all the .h's and just include them in each file.
  41. var INCLUDES = new FileList("**/*.h").map(function(aFilename)
  42. {
  43. return "--include \"" + aFilename + "\"";
  44. }).join(" ");
  45. INCLUDES = "--include \"../AppKit/Platform/Platform.h\" " + INCLUDES;
  46. if ($CONFIGURATION === "Release")
  47. foundationTask.setCompilerFlags("-O " + INCLUDES);
  48. else
  49. foundationTask.setCompilerFlags("-DDEBUG -g " + INCLUDES);
  50. });
  51. $BUILD_CJS_FOUNDATION = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "Foundation");
  52. filedir ($BUILD_CJS_FOUNDATION, ["Foundation"], function()
  53. {
  54. cp_r(foundationTask.buildProductPath(), $BUILD_CJS_FOUNDATION);
  55. });
  56. task ("build", ["Foundation", $BUILD_CJS_FOUNDATION]);
  57. CLOBBER.include($BUILD_CJS_FOUNDATION);