Makefile.snowleopard 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # tools
  2. MAKE=make
  3. PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
  4. XCODEBUILD=xcodebuild
  5. PMSURVEY=$(CURDIR)/pmsurvey
  6. # prefix
  7. PREFIX=/Users/gviz/FIX/Darwin.i386
  8. # base
  9. GV_DIR=../..
  10. DOT=dot
  11. ARCH = -arch i386 -arch x86_64
  12. #
  13. # graphviz
  14. #
  15. graphviz.pkg: usr/local/bin/$(DOT) graphviz.pmdoc/02graphviz-contents.xml postinstall
  16. @echo
  17. @echo PACKAGING GRAPHVIZ...
  18. @echo
  19. "$(PACKAGEMAKER)" --verbose --doc graphviz.pmdoc --out $@
  20. graphviz.pmdoc/02graphviz-contents.xml: Release/Graphviz.app
  21. @echo
  22. @echo SURVEYING GRAPHVIZ...
  23. @echo
  24. "$(PMSURVEY)" "$(CURDIR)/Release/Graphviz.app" >$@
  25. usr/local/bin/$(DOT): $(GV_DIR)/cmd/dot/.libs/$(DOT)
  26. @echo
  27. @echo INSTALLING GRAPHVIZ...
  28. @echo
  29. $(MAKE) DESTDIR=$(CURDIR) -C $(GV_DIR) install-strip
  30. rm -rf usr/local/lib/*.la
  31. rm -rf usr/local/lib/graphviz/*.la
  32. rm -rf usr/local/lib/graphviz/tcl/libtcldot_builtin.*
  33. cp $(PREFIX)/bin/fc-cache usr/local/bin/gv-fc-cache
  34. Release/Graphviz.app: ../*.m ../*.h $(GV_DIR)/cmd/dot/.libs/$(DOT)
  35. @echo
  36. @echo BUILDING GRAPHVIZ GUI...
  37. @echo
  38. "$(XCODEBUILD)" -project ../graphviz.xcodeproj -configuration Release
  39. postinstall:
  40. echo "#!/bin/sh" >$@
  41. echo >>$@
  42. echo 'if [[ `uname -m` = i386 ]]; then rm /usr/local/lib/graphviz/*pango*; fi' >>$@
  43. echo "/usr/local/bin/dot -c" >>$@
  44. # make -n -C ../../tclpkg install-data-hook >>$@
  45. echo "arch -arch i386 /usr/local/bin/gv-fc-cache" >>$@
  46. echo 'if test `sysctl -n hw.cpu64bit_capable` = 1; then arch -arch x86_64 /usr/local/bin/gv-fc-cache; fi' >>$@
  47. $(GV_DIR)/cmd/dot/.libs/$(DOT): $(GV_DIR)/Makefile
  48. @echo
  49. @echo MAKING GRAPHVIZ...
  50. @echo
  51. if [[ -e $@ ]]; then $(MAKE) -C $(GV_DIR) clean; fi
  52. $(MAKE) -C $(GV_DIR)/tclpkg/tclstubs
  53. $(MAKE) -C $(GV_DIR)
  54. $(GV_DIR)/Makefile: $(GV_DIR)/configure
  55. @echo
  56. @echo CONFIGURING GRAPHVIZ...
  57. @echo
  58. cd $(GV_DIR) && ./configure --enable-swig=no --disable-dependency-tracking --with-ipsepcola --with-quartz --with-smyrna=no --disable-perl --with-extra-includedir="$(PREFIX)/include" --with-extra-libdir="$(PREFIX)/lib" CFLAGS="-O2 $(ARCH)" CXXFLAGS="-O2 $(ARCH)" OBJCFLAGS="-O2 $(ARCH)" LDFLAGS="$(ARCH) -Wl,-dead_strip" GDLIB_CONFIG="$(PREFIX)/bin/gdlib-config" PKG_CONFIG="$(PREFIX)/bin/pkg-config" PKG_CONFIG_PATH="$(PREFIX)/lib/pkgconfig:/usr/X11/lib/pkgconfig"
  59. .PHONY: clean
  60. clean:
  61. $(MAKE) -C $(GV_DIR) clean
  62. .PHONY: distclean
  63. distclean:
  64. $(MAKE) -C $(GV_DIR) distclean