| 1 |
CC=@CC@ |
| 2 |
LD=@CC@ |
| 3 |
BASECFLAGS=@BASECFLAGS@ |
| 4 |
OPT=@OPT@ |
| 5 |
CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT) |
| 6 |
LDFLAGS=@LDFLAGS@ |
| 7 |
srcdir= @srcdir@ |
| 8 |
VERSION= @VERSION@ |
| 9 |
UNIVERSALSDK=@UNIVERSALSDK@ |
| 10 |
builddir= ../.. |
| 11 |
|
| 12 |
RUNSHARED= @RUNSHARED@ |
| 13 |
BUILDEXE= @BUILDEXEEXT@ |
| 14 |
BUILDPYTHON= $(builddir)/python$(BUILDEXE) |
| 15 |
PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ |
| 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 |
|
| 22 |
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) |
| 23 |
OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o |
| 24 |
|
| 25 |
install: 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 |
|
| 33 |
clean: |
| 34 |
rm -f *.o "Python Launcher" |
| 35 |
rm -rf "Python Launcher.app" |
| 36 |
rm -f Info.plist |
| 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 |
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 |
|
| 56 |
FileSettings.o: $(srcdir)/FileSettings.m |
| 57 |
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m |
| 58 |
|
| 59 |
MyAppDelegate.o: $(srcdir)/MyAppDelegate.m |
| 60 |
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m |
| 61 |
|
| 62 |
MyDocument.o: $(srcdir)/MyDocument.m |
| 63 |
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m |
| 64 |
|
| 65 |
PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m |
| 66 |
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m |
| 67 |
|
| 68 |
doscript.o: $(srcdir)/doscript.m |
| 69 |
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m |
| 70 |
|
| 71 |
main.o: $(srcdir)/main.m |
| 72 |
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m |
| 73 |
|
| 74 |
Python\ Launcher: $(OBJECTS) |
| 75 |
$(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon |
| 76 |
|
| 77 |
Info.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 |