Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 1 | CC=@CC@ |
| 2 | LD=@CC@ |
| 3 | BASECFLAGS=@BASECFLAGS@ |
| 4 | OPT=@OPT@ |
Ronald Oussoren | 712979d | 2010-04-20 19:51:33 +0000 | [diff] [blame] | 5 | CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 6 | LDFLAGS=@LDFLAGS@ |
| 7 | srcdir= @srcdir@ |
| 8 | VERSION= @VERSION@ |
| 9 | UNIVERSALSDK=@UNIVERSALSDK@ |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 10 | builddir= ../.. |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 11 | |
| 12 | RUNSHARED= @RUNSHARED@ |
| 13 | BUILDEXE= @BUILDEXEEXT@ |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 14 | BUILDPYTHON= $(builddir)/python$(BUILDEXE) |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 15 | PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16 | |
| 17 | # Deployment target selected during configure, to be checked |
| 18 | # by distutils |
| 19 | MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ |
| 20 | @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET |
| 21 | |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 22 | BUNDLEBULDER=$(srcdir)/../Tools/bundlebuilder.py |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 23 | |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 24 | PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 25 | OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o |
| 26 | |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 27 | install: Python\ Launcher.app |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 28 | test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" |
| 29 | -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" |
Ronald Oussoren | af11860 | 2009-01-02 11:48:29 +0000 | [diff] [blame] | 30 | /bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 31 | touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 32 | |
| 33 | |
| 34 | clean: |
| 35 | rm -f *.o "Python Launcher" |
| 36 | rm -rf "Python Launcher.app" |
| 37 | |
| 38 | Python\ 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 | $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \ |
| 45 | --builddir=. \ |
| 46 | --name="Python Launcher" \ |
| 47 | --executable="Python Launcher" \ |
| 48 | --iconfile=$(srcdir)/../Icons/PythonLauncher.icns \ |
| 49 | --bundle-id=org.python.PythonLauncher \ |
| 50 | --resource=$(srcdir)/../Icons/PythonSource.icns \ |
| 51 | --resource=$(srcdir)/../Icons/PythonCompiled.icns \ |
| 52 | --resource=$(srcdir)/English.lproj \ |
| 53 | --resource=$(srcdir)/factorySettings.plist \ |
| 54 | --plist Info.plist \ |
| 55 | build |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 56 | |
| 57 | FileSettings.o: $(srcdir)/FileSettings.m |
| 58 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m |
| 59 | |
| 60 | MyAppDelegate.o: $(srcdir)/MyAppDelegate.m |
| 61 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m |
| 62 | |
| 63 | MyDocument.o: $(srcdir)/MyDocument.m |
| 64 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m |
| 65 | |
| 66 | PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m |
| 67 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m |
| 68 | |
| 69 | doscript.o: $(srcdir)/doscript.m |
| 70 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m |
| 71 | |
| 72 | main.o: $(srcdir)/main.m |
| 73 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m |
| 74 | |
| 75 | Python\ Launcher: $(OBJECTS) |
| 76 | $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon |
| 77 | |
| 78 | Info.plist: $(srcdir)/Info.plist.in |
| 79 | sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist |