PageRenderTime 22ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/visualizations/Goom/goom2k4-0/mac/Makefile

http://github.com/xbmc/xbmc
Makefile | 88 lines | 37 code | 30 blank | 21 comment | 0 complexity | 232889f6e690aefe4cdb18cfd28277a5 MD5 | raw file
 1# Makefile
 2# author: Gyom / iOS-Software
 3# Jan 2005
 4
 5
 6###############
 7# Settings
 8macimage_name=iGoom
 9libobjects=../src/.libs/*.o
10#buildroot=defaults read com.apple.Xcode "PBXApplicationwideBuildSettings" | cut -f2 -d"SYMROOT" | cut -f2 -d"\""
11buildroot=.
12BUNDLE=$(buildroot)/iGoom.bundle
13APP=$(buildroot)/iGoom.app
14installer=iTunes/iTunes-Installer.app
15
16
17all: $(APP) $(BUNDLE)
18
19
20###############
21# Misc library Targets
22
23# We build an embedable version of libgoom
24StandAlone/libgoom2.0.dylib:$(libobjects)
25	gcc -dynamiclib  -flat_namespace -o StandAlone/libgoom2.0.dylib $(libobjects) -install_name @executable_path/../Frameworks/libgoom2.0.dylib -compatibility_version 1 -current_version 1.0 -seg1addr 0x40000 -prebind
26
27# We link static only with iTunes because the install_path
28# cannot be set properly to embed the lib in the bundle
29# We must not place it in the mac folder because the bundle will
30# link against the dynamic version if it is present
31iTunes/libgoom2.0.a:$(libobjects)
32	libtool  -static  -o iTunes/libgoom2.0.a $(libobjects)
33
34
35#########################
36# Standalone Application
37
38standalone:$(APP)
39
40$(APP): StandAlone/libgoom2.0.dylib Makefile
41	xcodebuild -target "iGoom - StandAlone" -buildstyle Deployment SYMROOT=$(buildroot)
42
43cleanstandalone:
44	xcodebuild clean -target "iGoom - StandAlone" -buildstyle Deployment SYMROOT=$(buildroot)
45
46
47
48###############
49# iTunes Plugin
50
51itunes:$(BUNDLE)
52
53$(BUNDLE):iTunes/libgoom2.0.a Makefile
54	xcodebuild -target "iGoom - iTunes" -buildstyle Deployment SYMROOT=$(buildroot)
55
56cleanitunes:
57	xcodebuild clean -target "iGoom - iTunes" -buildstyle Deployment SYMROOT=$(buildroot)
58
59$(installer):iTunes/Installer.applescript
60	osacompile -o $(installer) -x iTunes/Installer.applescript
61	
62
63
64######################
65# Distribution Package
66
67all: $(APP) $(BUNDLE)
68
69package:$(macimage_name).dmg
70
71$(macimage_name).dmg:all ReadMe.rtf $(installer)
72	rm -rf $(macimage_name).dmg $(macimage_name)
73	mkdir -p $(macimage_name) 
74	cp -r $(BUNDLE) $(macimage_name)
75	cp -r $(APP) $(macimage_name)
76	cp ReadMe.rtf $(macimage_name)
77	cp -rf $(installer) $(macimage_name)/
78	hdiutil create -srcfolder $(macimage_name) $(macimage_name).dmg
79
80
81##########
82# Clean up
83
84clean:
85	rm -rf $(BUNDLE) $(APP) $(installer)
86	rm -rf $(macimage_name).dmg $(macimage_name)  $(buildroot)/iGoom.build
87	rm -f StandAlone/libgoom2.* iTunes/libgoom2.* libgoom2.*
88