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 22BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py 23 24PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) 25OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o 26 27all: Python\ Launcher.app 28 29install: Python\ Launcher.app 30 test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" 31 -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" 32 /bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)" 33 touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" 34 35clean: 36 rm -f *.o "Python Launcher" 37 rm -rf "Python Launcher.app" 38 39Python\ Launcher.app: Info.plist \ 40 Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \ 41 $(srcdir)/../Icons/PythonSource.icns \ 42 $(srcdir)/../Icons/PythonCompiled.icns \ 43 $(srcdir)/factorySettings.plist 44 rm -fr "Python Launcher.app" 45 $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \ 46 --builddir=. \ 47 --name="Python Launcher" \ 48 --executable="Python Launcher" \ 49 --iconfile=$(srcdir)/../Icons/PythonLauncher.icns \ 50 --bundle-id=org.python.PythonLauncher \ 51 --resource=$(srcdir)/../Icons/PythonSource.icns \ 52 --resource=$(srcdir)/../Icons/PythonCompiled.icns \ 53 --resource=$(srcdir)/English.lproj \ 54 --resource=$(srcdir)/factorySettings.plist \ 55 --plist Info.plist \ 56 build 57 58FileSettings.o: $(srcdir)/FileSettings.m 59 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m 60 61MyAppDelegate.o: $(srcdir)/MyAppDelegate.m 62 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m 63 64MyDocument.o: $(srcdir)/MyDocument.m 65 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m 66 67PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m 68 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m 69 70doscript.o: $(srcdir)/doscript.m 71 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m 72 73main.o: $(srcdir)/main.m 74 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m 75 76Python\ Launcher: $(OBJECTS) 77 $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon 78 79Info.plist: $(srcdir)/Info.plist.in 80 sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist 81