blob: 4c05f26e8358bc3f235cb1c3c4d10f43a606597d [file] [log] [blame]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001CC=@CC@
2LD=@CC@
3BASECFLAGS=@BASECFLAGS@
4OPT=@OPT@
Ronald Oussoren712979d2010-04-20 19:51:33 +00005CFLAGS=@CFLAGS@ $(BASECFLAGS) $(OPT)
Thomas Wouters477c8d52006-05-27 19:21:47 +00006LDFLAGS=@LDFLAGS@
7srcdir= @srcdir@
8VERSION= @VERSION@
9UNIVERSALSDK=@UNIVERSALSDK@
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000010builddir= ../..
Thomas Wouters477c8d52006-05-27 19:21:47 +000011
12RUNSHARED= @RUNSHARED@
13BUILDEXE= @BUILDEXEEXT@
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000014BUILDPYTHON= $(builddir)/python$(BUILDEXE)
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
Thomas Wouters477c8d52006-05-27 19:21:47 +000016
17# Deployment target selected during configure, to be checked
Ned Deily13399442014-03-29 23:54:15 -070018# by distutils
Thomas Wouters477c8d52006-05-27 19:21:47 +000019MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
20@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
21
Ronald Oussoren86b33c82010-04-30 11:41:56 +000022PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
Thomas Wouters477c8d52006-05-27 19:21:47 +000023OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
24
Ronald Oussoren21600152008-12-30 12:59:02 +000025install: Python\ Launcher.app
Thomas Wouters477c8d52006-05-27 19:21:47 +000026 test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
27 -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
Ronald Oussorenaf118602009-01-02 11:48:29 +000028 /bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
Thomas Wouters477c8d52006-05-27 19:21:47 +000029 touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
Ronald Oussoren21600152008-12-30 12:59:02 +000030
Ronald Oussoren21600152008-12-30 12:59:02 +000031clean:
32 rm -f *.o "Python Launcher"
33 rm -rf "Python Launcher.app"
Ned Deily13399442014-03-29 23:54:15 -070034 rm -f Info.plist
Ronald Oussoren21600152008-12-30 12:59:02 +000035
36Python\ 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 Deily13399442014-03-29 23:54:15 -070042 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 Oussoren21600152008-12-30 12:59:02 +000053
54FileSettings.o: $(srcdir)/FileSettings.m
55 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m
56
57MyAppDelegate.o: $(srcdir)/MyAppDelegate.m
58 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m
59
60MyDocument.o: $(srcdir)/MyDocument.m
61 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m
62
63PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m
64 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m
65
66doscript.o: $(srcdir)/doscript.m
67 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m
68
69main.o: $(srcdir)/main.m
70 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m
71
72Python\ Launcher: $(OBJECTS)
73 $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon
74
75Info.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