1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- # tools
- MAKE=make
- PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
- XCODEBUILD=xcodebuild
- PMSURVEY=$(CURDIR)/pmsurvey
- # prefix
- PREFIX=/Users/gviz/FIX/Darwin.i386
- # base
- GV_DIR=../..
- DOT=dot
- ARCH = -arch i386 -arch x86_64
- #
- # graphviz
- #
- graphviz.pkg: usr/local/bin/$(DOT) graphviz.pmdoc/02graphviz-contents.xml postinstall
- @echo
- @echo PACKAGING GRAPHVIZ...
- @echo
- "$(PACKAGEMAKER)" --verbose --doc graphviz.pmdoc --out $@
- graphviz.pmdoc/02graphviz-contents.xml: Release/Graphviz.app
- @echo
- @echo SURVEYING GRAPHVIZ...
- @echo
- "$(PMSURVEY)" "$(CURDIR)/Release/Graphviz.app" >$@
- usr/local/bin/$(DOT): $(GV_DIR)/cmd/dot/.libs/$(DOT)
- @echo
- @echo INSTALLING GRAPHVIZ...
- @echo
- $(MAKE) DESTDIR=$(CURDIR) -C $(GV_DIR) install-strip
- rm -rf usr/local/lib/*.la
- rm -rf usr/local/lib/graphviz/*.la
- rm -rf usr/local/lib/graphviz/tcl/libtcldot_builtin.*
- cp $(PREFIX)/bin/fc-cache usr/local/bin/gv-fc-cache
-
- Release/Graphviz.app: ../*.m ../*.h $(GV_DIR)/cmd/dot/.libs/$(DOT)
- @echo
- @echo BUILDING GRAPHVIZ GUI...
- @echo
- "$(XCODEBUILD)" -project ../graphviz.xcodeproj -configuration Release
- postinstall:
- echo "#!/bin/sh" >$@
- echo >>$@
- echo 'if [[ `uname -m` = i386 ]]; then rm /usr/local/lib/graphviz/*pango*; fi' >>$@
- echo "/usr/local/bin/dot -c" >>$@
- # make -n -C ../../tclpkg install-data-hook >>$@
- echo "arch -arch i386 /usr/local/bin/gv-fc-cache" >>$@
- echo 'if test `sysctl -n hw.cpu64bit_capable` = 1; then arch -arch x86_64 /usr/local/bin/gv-fc-cache; fi' >>$@
- $(GV_DIR)/cmd/dot/.libs/$(DOT): $(GV_DIR)/Makefile
- @echo
- @echo MAKING GRAPHVIZ...
- @echo
- if [[ -e $@ ]]; then $(MAKE) -C $(GV_DIR) clean; fi
- $(MAKE) -C $(GV_DIR)/tclpkg/tclstubs
- $(MAKE) -C $(GV_DIR)
-
- $(GV_DIR)/Makefile: $(GV_DIR)/configure
- @echo
- @echo CONFIGURING GRAPHVIZ...
- @echo
- 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"
- .PHONY: clean
- clean:
- $(MAKE) -C $(GV_DIR) clean
- .PHONY: distclean
- distclean:
- $(MAKE) -C $(GV_DIR) distclean
|