Build system: Move install definitions to include
[openafs.git] / src / platform / DARWIN / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.pthread
11
12
13 OSXSDK = @OSXSDK@
14
15 .PHONY: all afscell
16
17 all: OpenAFS.prefPane afssettings afscell growlagent aklog.bundle
18
19 AFSPreference/build/Release/OpenAFS.prefPane: OpenAFS.prefPane
20 afscell/build/Release/afscell.bundle: afscell
21 afscell/InstallerSections.plist: afscell 
22
23 OpenAFS.prefPane:
24         @case ${OSXSDK} in \
25         macosx* ) \
26                 xcodebuild -sdk ${OSXSDK} -project ${srcdir}/AFSPreference/OpenAFS.xcodeproj SYMDIR=`pwd`/AFSPreference/build;; \
27         * ) \
28                 echo Not building AFS prefPane for ${OSXSDK} ;; \
29         esac
30
31 aklog.bundle:
32         @case ${OSXSDK} in \
33         macosx* ) \
34                 xcodebuild -sdk ${OSXSDK} -project ${srcdir}/AklogAuthPlugin/AklogAuthPlugin.xcodeproj SYMDIR=`pwd`/AklogAuthPlugin/build;; \
35         * ) \
36                 echo Not building AklogAuthPlugin for ${OSXSDK} ;; \
37         esac
38
39 growlagent:
40         cd growlagent && $(MAKE) all
41
42 afscell:
43         @case ${OSXSDK} in \
44         macosx* ) \
45                 xcodebuild -sdk ${OSXSDK} -project ${srcdir}/afscell/afscell.xcodeproj SYMROOT=`pwd`/afscell/build;; \
46         * ) \
47                 echo Not building afscell.bundle for ${OSXSDK} ;; \
48         esac
49
50 afssettings: afssettings.m 
51         ${CC} ${AFS_CFLAGS} -o afssettings $? -framework Foundation
52
53 install: \
54         ${DESTDIR}${sbindir}/afssettings
55         cd growlagent && $(MAKE) install
56
57 dest: \
58         ${DEST}/etc/afssettings \
59         ${DEST}/installer/afscell.bundle \
60         ${DEST}/installer/InstallerSections.plist \
61         ${DEST}/tools/OpenAFS.prefPane \
62         ${DEST}/tools/aklog.bundle
63         cd growlagent && $(MAKE) dest
64
65 ${DESTDIR}${sbindir}/afssettings: afssettings
66         ${INSTALL} $? $@
67
68 ${DEST}/etc/afssettings: afssettings
69         ${INSTALL} $? $@
70
71 ${DEST}/tools/aklog.bundle: AklogAuthPlugin/build/Release/aklog.bundle
72         -mkdir -p ${DEST}/tools
73         rm -rf ${DEST}/tools/aklog.bundle
74         cp -R $? $@
75
76 ${DEST}/installer/afscell.bundle: afscell/build/Release/afscell.bundle
77         -mkdir -p ${DEST}/installer
78         rm -rf ${DEST}/installer/afscell.bundle
79         cp -R $? $@
80
81 ${DEST}/installer/InstallerSections.plist: afscell/InstallerSections.plist
82         ${INSTALL} $? $@
83
84 ${DEST}/tools/OpenAFS.prefPane: AFSPreference/build/Release/OpenAFS.prefPane
85         -mkdir -p ${DEST}/tools
86         rm -rf ${DEST}/tools/OpenAFS.prefPane
87         cp -R $? $@
88
89 clean:
90         $(RM) -rf OpenAFS.prefPane
91         $(RM) -rf AFSPreference/build
92         $(RM) -rf AklogAuthPlugin/build
93         $(RM) -rf afscell/build
94         $(RM) -f *.o core afssettings AFS_component_version_number.c
95         cd growlagent && $(MAKE) clean