#!/bin/sh # # This script makes a Apple Mac OS X framework for PETSc see ./makeall # # To use the framework: # # 1) replace all #include in application with #import # 2a) compile in src/snes/examples/tutorials, cc -v ex19.c -o ex19 -DPETSC_APPLE_FRAMEWORK=1 -F ${PETSC_DIR}/${PETSC_ARCH} -framework PETSc or # 2b) copy ${PETSC_DIR}/${PETSC_ARCH}/PETSc.framework to /System/Library/Frameworks/ then you do not need the -F option or # 3) you can also use the framework inside Xcode by simply indicating the targets dependence on the PETSc framework # # rm -rf ${PETSC_DIR}/${PETSC_ARCH}/PETSc.framework mkdir ${PETSC_DIR}/${PETSC_ARCH}/PETSc.framework mkdir ${PETSC_DIR}/${PETSC_ARCH}/PETSc.framework/Versions mkdir ${PETSC_DIR}/${PETSC_ARCH}/PETSc.framework/Versions/A cd ${PETSC_DIR}/${PETSC_ARCH}/PETSc.framework/Versions/ ln -s A Current cd A mkdir Headers cp ${PETSC_DIR}/include/*.h Headers cp ${PETSC_DIR}/${PETSC_ARCH}/include/*.h Headers cp -r ${PETSC_DIR}/include/petsc-private Headers cd Headers sed -i "" "s?#include [ ]* Info.plist BuildMachineOSBuild 12A269 CFBundleDevelopmentRegion English CFBundleExecutable PETSc CFBundleIdentifier gov.anl.mcs.PETSc CFBundleInfoDictionaryVersion 6.0 CFBundleName PETSc CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 DTCompiler DTPlatformBuild 4F250 DTPlatformVersion GM DTSDKBuild 12A264 DTSDKName macosx10.8 DTXcode 0440 DTXcodeBuild 4F250 NSHumanReadableCopyright Copyright © 2012 Argonne National Laboratory. All rights reserved. EOF cd ${PETSC_DIR}/${PETSC_ARCH}/PETSc.framework ln -s Versions/Current/Headers Headers ln -s Versions/Current/PETSc PETSc ln -s Versions/Current/Resources Resources