| 1 | DEV_HOME := . |
|---|
| 2 | MULBERRY_HOME := ${DEV_HOME}/Mulberry |
|---|
| 3 | LIBRARIES_HOME := ${DEV_HOME}/Libraries |
|---|
| 4 | POWERPLANT_HOME := ${LIBRARIES_HOME}/open-powerplant |
|---|
| 5 | |
|---|
| 6 | SVN_ROOT := http://svn.mulberrymail.com |
|---|
| 7 | SVN_MULBERRY := ${SVN_ROOT}/mulberry |
|---|
| 8 | SVN_LIBRARIES := ${SVN_ROOT}/repos |
|---|
| 9 | SVN_POWERPLANT := https://open-powerplant.svn.sourceforge.net/svnroot/open-powerplant/trunk |
|---|
| 10 | |
|---|
| 11 | # Plugins to build |
|---|
| 12 | BUILD_PLUGINS := PluginLibrary CommunicatorAdbkIO CRAM-MD5 DIGEST-MD5 \ |
|---|
| 13 | Eudora4AdbkIO EudoraAdbkIO GPG GSSAPI Kerberos \ |
|---|
| 14 | NetscapeAdbkIO OEAdbkIO PGP PineAdbkIO QuickmailAdbkIO \ |
|---|
| 15 | QuickmailProAdbkIO SMIME SSL vCardAdbkIO |
|---|
| 16 | |
|---|
| 17 | APP_TARGET := $(shell \ |
|---|
| 18 | if { uname -p | egrep 'powerpc' > /dev/null; } \ |
|---|
| 19 | then { echo "Debug"; } \ |
|---|
| 20 | else { echo "Debug x86"; } fi) |
|---|
| 21 | |
|---|
| 22 | libraries: |
|---|
| 23 | mkdir ${LIBRARIES_HOME} |
|---|
| 24 | |
|---|
| 25 | ppsrc: libraries |
|---|
| 26 | svn checkout ${SVN_POWERPLANT} ${POWERPLANT_HOME}; |
|---|
| 27 | |
|---|
| 28 | otherlibs: libraries |
|---|
| 29 | (cd ${LIBRARIES_HOME}; \ |
|---|
| 30 | curl -O http://developer.apple.com/samplecode/MoreFiles/MoreFiles.zip; \ |
|---|
| 31 | unzip MoreFiles.zip; \ |
|---|
| 32 | rm MoreFiles.zip; \ |
|---|
| 33 | curl -O http://developer.apple.com/samplecode/MoreFilesX/MoreFilesX.zip; \ |
|---|
| 34 | unzip MoreFilesX.zip; \ |
|---|
| 35 | rm MoreFilesX.zip) |
|---|
| 36 | |
|---|
| 37 | librariessrc: libraries |
|---|
| 38 | (cd ${LIBRARIES_HOME}; \ |
|---|
| 39 | svn checkout ${SVN_LIBRARIES}/CICalendar/trunk CICalendar; \ |
|---|
| 40 | svn checkout ${SVN_LIBRARIES}/vCard/trunk vCard; \ |
|---|
| 41 | svn checkout ${SVN_LIBRARIES}/XMLLib/trunk XMLLib) |
|---|
| 42 | |
|---|
| 43 | mulberrysrc: |
|---|
| 44 | svn checkout ${SVN_MULBERRY}/Mulberry/trunk Mulberry |
|---|
| 45 | |
|---|
| 46 | patchpp: |
|---|
| 47 | (cd ${MULBERRY_HOME}/MacOS/Patches; \ |
|---|
| 48 | ./patchapply.py) |
|---|
| 49 | |
|---|
| 50 | updatepp: |
|---|
| 51 | (cd ${POWERPLANT_HOME}; svn update) |
|---|
| 52 | |
|---|
| 53 | updatelibraries: |
|---|
| 54 | (cd ${LIBRARIES_HOME}; \ |
|---|
| 55 | cd CICalendar; svn update; \ |
|---|
| 56 | cd ../vCard; svn update; \ |
|---|
| 57 | cd ../XMLLib; svn update) |
|---|
| 58 | |
|---|
| 59 | updatemulberry: |
|---|
| 60 | (cd ${MULBERRY_HOME}; svn update) |
|---|
| 61 | |
|---|
| 62 | init: ppsrc librariessrc otherlibs mulberrysrc patchpp |
|---|
| 63 | |
|---|
| 64 | buildplugins: |
|---|
| 65 | @for PLUGIN in $(BUILD_PLUGINS); do \ |
|---|
| 66 | echo "-->Building $$PLUGIN"; \ |
|---|
| 67 | xcodebuild -project Mulberry/Plug-ins/$$PLUGIN/$$PLUGIN.xcodeproj; \ |
|---|
| 68 | echo "" ;\ |
|---|
| 69 | done |
|---|
| 70 | |
|---|
| 71 | buildapp: |
|---|
| 72 | echo "-->Building Mulberry ${APP_TARGET}" |
|---|
| 73 | xcodebuild -project Mulberry/MacOS/MulberryXcode.xcodeproj -configuration "${APP_TARGET}" |
|---|
| 74 | |
|---|
| 75 | build: buildplugins buildapp |
|---|
| 76 | echo "Built Mulberry" |
|---|
| 77 | |
|---|
| 78 | update: updatelibraries updatemulberry |
|---|
| 79 | |
|---|
| 80 | all: init build |
|---|