1CC=@CC@ 2LD=@CC@ 3BASECFLAGS=@BASECFLAGS@ 4OPT=@OPT@ 5CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT) 6LDFLAGS=@LDFLAGS@ 7srcdir= @srcdir@ 8VERSION= @VERSION@ 9UNIVERSALSDK=@UNIVERSALSDK@ 10builddir= ../.. 11 12RUNSHARED= @RUNSHARED@ 13BUILDEXE= @BUILDEXEEXT@ 14BUILDPYTHON= $(builddir)/python$(BUILDEXE) 15PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ 16 17# Deployment target selected during configure, to be checked 18# by distutils 19MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ 20@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET 21 22PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) 23OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o 24 25install: Python\ Launcher.app 26 test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" 27 -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" 28 /bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)" 29 touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" 30 chmod -R ugo+rX,go-w "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" 31 chmod ugo+x "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app/Contents/MacOS/Python Launcher" 32 33clean: 34 rm -f *.o "Python Launcher" 35 rm -rf "Python Launcher.app" 36 rm -f Info.plist 37 38Python\ Launcher.app: Info.plist \ 39 Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \ 40 $(srcdir)/../Icons/PythonSource.icns \ 41 $(srcdir)/../Icons/PythonCompiled.icns \ 42 $(srcdir)/factorySettings.plist 43 rm -fr "Python Launcher.app" 44 mkdir "Python Launcher.app" 45 mkdir "Python Launcher.app/Contents" 46 mkdir "Python Launcher.app/Contents/MacOS" 47 mkdir "Python Launcher.app/Contents/Resources" 48 cp "Python Launcher" "Python Launcher.app/Contents/MacOS" 49 cp Info.plist "Python Launcher.app/Contents" 50 cp $(srcdir)/../Icons/PythonLauncher.icns "Python Launcher.app/Contents/Resources" 51 cp $(srcdir)/../Icons/PythonSource.icns "Python Launcher.app/Contents/Resources" 52 cp $(srcdir)/../Icons/PythonCompiled.icns "Python Launcher.app/Contents/Resources" 53 cp $(srcdir)/factorySettings.plist "Python Launcher.app/Contents/Resources" 54 cp -R $(srcdir)/English.lproj "Python Launcher.app/Contents/Resources" 55 56FileSettings.o: $(srcdir)/FileSettings.m 57 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m 58 59MyAppDelegate.o: $(srcdir)/MyAppDelegate.m 60 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m 61 62MyDocument.o: $(srcdir)/MyDocument.m 63 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m 64 65PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m 66 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m 67 68doscript.o: $(srcdir)/doscript.m 69 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m 70 71main.o: $(srcdir)/main.m 72 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m 73 74Python\ Launcher: $(OBJECTS) 75 $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon 76 77Info.plist: $(srcdir)/Info.plist.in 78 sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist 79