blob: f05efdfbfd70acb7a276974de43bfe781215c496 [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
18# by distutils
19MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
20@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
21
Ronald Oussoren21600152008-12-30 12:59:02 +000022BUNDLEBULDER=$(srcdir)/../Tools/bundlebuilder.py
Thomas Wouters477c8d52006-05-27 19:21:47 +000023
Ronald Oussoren86b33c82010-04-30 11:41:56 +000024PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
Thomas Wouters477c8d52006-05-27 19:21:47 +000025OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
26
Ronald Oussoren21600152008-12-30 12:59:02 +000027install: Python\ Launcher.app
Thomas Wouters477c8d52006-05-27 19:21:47 +000028 test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
29 -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
Ronald Oussorenaf118602009-01-02 11:48:29 +000030 /bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
Thomas Wouters477c8d52006-05-27 19:21:47 +000031 touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
Ronald Oussoren21600152008-12-30 12:59:02 +000032
33
34clean:
35 rm -f *.o "Python Launcher"
36 rm -rf "Python Launcher.app"
37
38Python\ 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 Oussoren21600152008-12-30 12:59:02 +000056
57FileSettings.o: $(srcdir)/FileSettings.m
58 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m
59
60MyAppDelegate.o: $(srcdir)/MyAppDelegate.m
61 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m
62
63MyDocument.o: $(srcdir)/MyDocument.m
64 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m
65
66PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m
67 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m
68
69doscript.o: $(srcdir)/doscript.m
70 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m
71
72main.o: $(srcdir)/main.m
73 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m
74
75Python\ Launcher: $(OBJECTS)
76 $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon
77
78Info.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