PageRenderTime 35ms CodeModel.GetById 25ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/Mac/PythonLauncher/Makefile.in

http://unladen-swallow.googlecode.com/
Autoconf | 82 lines | 63 code | 17 blank | 2 comment | 2 complexity | 5d590e96607f84b7898d82d0cf7ab045 MD5 | raw file
 1CC=@CC@
 2LD=@CC@
 3BASECFLAGS=@BASECFLAGS@
 4OPT=@OPT@
 5CFLAGS=$(BASECFLAGS) $(OPT)
 6LDFLAGS=@LDFLAGS@
 7srcdir=         @srcdir@
 8VERSION=	@VERSION@
 9UNIVERSALSDK=@UNIVERSALSDK@
10builddir=	../..
11
12RUNSHARED=      @RUNSHARED@
13BUILDEXE=       @BUILDEXEEXT@
14BUILDPYTHON=    $(builddir)/python$(BUILDEXE)
15PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
16
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
22BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py
23
24PYTHONAPPSDIR=/Applications/$(PYTHONFRAMEWORK) $(VERSION)
25OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
26
27all: Python\ Launcher.app
28
29install: Python\ Launcher.app
30	test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
31	-test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
32	/bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
33	touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
34
35clean:
36	rm -f *.o "Python Launcher"
37	rm -rf "Python Launcher.app"
38
39Python\ Launcher.app:  Info.plist \
40		Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \
41		$(srcdir)/../Icons/PythonSource.icns \
42		$(srcdir)/../Icons/PythonCompiled.icns \
43		$(srcdir)/factorySettings.plist
44	rm -fr "Python Launcher.app"
45	$(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \
46		--builddir=. \
47		--name="Python Launcher" \
48		--executable="Python Launcher" \
49		--iconfile=$(srcdir)/../Icons/PythonLauncher.icns \
50		--bundle-id=org.python.PythonLauncher \
51		--resource=$(srcdir)/../Icons/PythonSource.icns \
52		--resource=$(srcdir)/../Icons/PythonCompiled.icns \
53		--resource=$(srcdir)/English.lproj \
54		--resource=$(srcdir)/factorySettings.plist \
55		--plist Info.plist \
56		build
57	find "Python Launcher.app" -name '.svn' -print0 | xargs -0 rm -r
58		
59
60FileSettings.o: $(srcdir)/FileSettings.m
61	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m
62
63MyAppDelegate.o: $(srcdir)/MyAppDelegate.m
64	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyAppDelegate.m
65
66MyDocument.o: $(srcdir)/MyDocument.m
67	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/MyDocument.m
68
69PreferencesWindowController.o: $(srcdir)/PreferencesWindowController.m
70	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/PreferencesWindowController.m
71
72doscript.o: $(srcdir)/doscript.m
73	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/doscript.m
74
75main.o: $(srcdir)/main.m
76	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/main.m
77
78Python\ Launcher: $(OBJECTS)
79	$(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon
80
81Info.plist: $(srcdir)/Info.plist.in
82	sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist