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 |
Ned Deily | 1339944 | 2014-03-29 23:54:15 -0700 | [diff] [blame] | 18 | # by distutils |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 19 | MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ |
| 20 | @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET |
| 21 | |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 22 | PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 23 | OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o |
| 24 | |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 25 | install: Python\ Launcher.app |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 26 | test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" |
| 27 | -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] | 28 | /bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 29 | touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 30 | |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 31 | clean: |
| 32 | rm -f *.o "Python Launcher" |
| 33 | rm -rf "Python Launcher.app" |
Ned Deily | 1339944 | 2014-03-29 23:54:15 -0700 | [diff] [blame] | 34 | rm -f Info.plist |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 35 | |
| 36 | Python\ Launcher.app: Info.plist \ |
| 37 | Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \ |
| 38 | $(srcdir)/../Icons/PythonSource.icns \ |
| 39 | $(srcdir)/../Icons/PythonCompiled.icns \ |
| 40 | $(srcdir)/factorySettings.plist |
| 41 | rm -fr "Python Launcher.app" |
Ned Deily | 1339944 | 2014-03-29 23:54:15 -0700 | [diff] [blame] | 42 | mkdir "Python Launcher.app" |
| 43 | mkdir "Python Launcher.app/Contents" |
| 44 | mkdir "Python Launcher.app/Contents/MacOS" |
| 45 | mkdir "Python Launcher.app/Contents/Resources" |
| 46 | cp "Python Launcher" "Python Launcher.app/Contents/MacOS" |
| 47 | cp Info.plist "Python Launcher.app/Contents" |
| 48 | cp $(srcdir)/../Icons/PythonLauncher.icns "Python Launcher.app/Contents/Resources" |
| 49 | cp $(srcdir)/../Icons/PythonSource.icns "Python Launcher.app/Contents/Resources" |
| 50 | cp $(srcdir)/../Icons/PythonCompiled.icns "Python Launcher.app/Contents/Resources" |
| 51 | cp $(srcdir)/factorySettings.plist "Python Launcher.app/Contents/Resources" |
| 52 | cp -R $(srcdir)/English.lproj "Python Launcher.app/Contents/Resources" |
Ronald Oussoren | 2160015 | 2008-12-30 12:59:02 +0000 | [diff] [blame] | 53 | |
| 54 | FileSettings.o: $(srcdir)/FileSettings.m |
| 55 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m |
| 56 | |
| 57 | MyAppDelegate.o: $(srcdir)/MyAppDelegate.m |
| 58 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m |
| 59 | |
| 60 | MyDocument.o: $(srcdir)/MyDocument.m |
| 61 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m |
| 62 | |
| 63 | PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m |
| 64 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m |
| 65 | |
| 66 | doscript.o: $(srcdir)/doscript.m |
| 67 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m |
| 68 | |
| 69 | main.o: $(srcdir)/main.m |
| 70 | $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m |
| 71 | |
| 72 | Python\ Launcher: $(OBJECTS) |
| 73 | $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon |
| 74 | |
| 75 | Info.plist: $(srcdir)/Info.plist.in |
| 76 | sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist |