macos prefpane fat binary arch selection correction
[openafs.git] / src / platform / DARWIN / Makefile.in
index 22ea6be..a472af6 100644 (file)
@@ -7,26 +7,67 @@
 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
-include ../config/Makefile.version
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
-all: afssettings
+.PHONY: all afscell
+
+all: OpenAFS.prefPane afssettings afscell
+
+AFSPreference/build/Release/OpenAFS.prefPane: OpenAFS.prefPane
+afscell/build/Release/afscell.bundle: afscell
+afscell/InstallerSections.plist: afscell 
+
+OpenAFS.prefPane:
+       @case ${SYS_NAME} in \
+       *_darwin_100 ) \
+               xcodebuild -sdk macosx10.6 -project AFSPreference/OpenAFS.xcodeproj ;; \
+       *_darwin_90 ) \
+               xcodebuild -sdk macosx10.5 -project AFSPreference/OpenAFS.xcodeproj ;; \
+       *_darwin_80 ) \
+               xcodebuild -sdk macosx10.4 -project AFSPreference/OpenAFS.xcodeproj ;; \
+       * ) \
+               echo Not building AFS prefPane for ${SYS_NAME} ;; \
+       esac
+
+afscell:
+       cd afscell && xcodebuild
 
 afssettings: afssettings.m 
-        ${CC} ${CFLAGS} -o afssettings afssettings.m -framework Foundation
+       ${CC} ${CFLAGS} -o afssettings afssettings.m -framework Foundation
 
 install: \
-        ${DESTDIR}${bindir}/afssettings
+       ${DESTDIR}${sbindir}/afssettings
 
 dest: \
-        ${DEST}/bin/afssettings
+       ${DEST}/etc/afssettings \
+       ${DEST}/installer/afscell.bundle \
+       ${DEST}/installer/InstallerSections.plist \
+       ${DEST}/tools/OpenAFS.prefPane
+
+${DESTDIR}${sbindir}/afssettings: afssettings
+       ${INSTALL} $? $@
 
+${DEST}/etc/afssettings: afssettings
+       ${INSTALL} $? $@
 
-${DESTDIR}${bindir}/afssettings: afssettings
-        ${INSTALL} -s $? $@
+${DEST}/installer/afscell.bundle: afscell/build/Release/afscell.bundle
+       mkdir -p ${DEST}/installer
+       rm -rf ${DEST}/installer/afscell.bundle
+       cp -R $? $@
 
+${DEST}/installer/InstallerSections.plist: afscell/InstallerSections.plist
+       ${INSTALL} $? $@
 
-${DEST}/bin/afssettings: afssettings
-       ${INSTALL} -s $? $@
+${DEST}/tools/OpenAFS.prefPane: AFSPreference/build/Release/OpenAFS.prefPane
+       mkdir -p ${DEST}/tools
+       rm -rf ${DEST}/tools/OpenAFS.prefPane
+       cp -R $? $@
 
 clean:
-       $(RM) -f *.o core afssettings AFS_component_version_number.c 
+       $(RM) -rf OpenAFS.prefPane
+       $(RM) -rf AFSPreference/build
+       $(RM) -f *.o core afssettings AFS_component_version_number.c
+       @cd afscell && xcodebuild clean