source: trunk/Makefile @ 262

Last change on this file since 262 was 262, checked in by titer, 16 years ago

Get revision at build time

  • Property svn:keywords set to Date Rev Author Id
File size: 2.1 KB
Line 
1# $Id: Makefile 262 2006-05-29 21:58:22Z titer $
2
3-include Makefile.config
4ifndef CONFIGURE_RUN
5$(error You must run ./configure first)
6endif
7
8-include Makefile.version
9include Makefile.common
10
11ifneq ($(SYSTEM),Darwin)
12
13TARGETS = .cli
14ifeq ($(GTK),yes)
15TARGETS += .gtk
16endif
17ifeq ($(SYSTEM),BeOS)
18TARGETS += .beos
19endif
20
21all: $(TARGETS)
22
23.lib: .version
24        @echo "* Building libtransmission"
25        @$(MAKE) -C libtransmission
26
27.cli: .lib
28        @echo "* Building Transmission CLI client"
29        @$(MAKE) -C cli
30
31.gtk: .lib
32        @echo "* Building Transmission GTK+ client"
33        @$(MAKE) -C gtk
34
35.beos: .lib
36        @echo "* Building Transmission BeOS client"
37        @make -C beos
38
39install: all $(foreach SUB,$(TARGETS),.install$(SUB))
40
41.install.cli: .cli
42        @echo "* Installing Transmission CLI client"
43        @$(MAKE) -C cli install
44
45.install.gtk: .gtk
46        @echo "* Installing Transmission GTK+ client"
47        @$(MAKE) -C gtk install
48
49.install.beos:
50
51clean:
52        @$(MAKE) -C libtransmission clean
53        @$(MAKE) -C cli clean
54ifeq ($(GTK),yes)
55        @$(MAKE) -C gtk clean
56endif
57ifeq ($(SYSTEM),BeOS)
58        @$(MAKE) -C beos clean
59endif
60
61else
62
63all: .version
64        @$(MAKE) -C macosx
65        @xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
66
67clean:
68        @xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
69        @$(MAKE) -C macosx clean
70
71MAKELINK = printf "[InternetShortcut]\nURL=http://transmission.m0k.org%s\n"
72define PACKAGE_RULE1
73        $(RM) tmp "Transmission $(VERSION_STRING)" \
74          Transmission-$(VERSION_STRING).dmg
75        mkdir -p tmp
76        cp -r macosx/Transmission.app tmp/
77        cp AUTHORS tmp/AUTHORS.txt
78        cp LICENSE tmp/LICENSE.txt
79        cp NEWS tmp/NEWS.txt
80        $(MAKELINK) "/" > tmp/Homepage.url
81        $(MAKELINK) "/forum" > tmp/Forums.url
82        $(MAKELINK) "/contribute.php" > tmp/Contribute.url
83endef
84define PACKAGE_RULE2
85        mv tmp "Transmission $(VERSION_STRING)"
86        hdiutil create -format UDZO -srcfolder \
87          "Transmission $(VERSION_STRING)" Transmission-$(VERSION_STRING).dmg
88        rm -rf "Transmission $(VERSION_STRING)"
89endef
90
91package:
92        $(PACKAGE_RULE1)
93        $(PACKAGE_RULE2)
94
95package-release:
96        $(PACKAGE_RULE1)
97        strip -S tmp/Transmission.app/Contents/MacOS/Transmission
98        $(PACKAGE_RULE2)
99
100endif
101
102Makefile.version: .version
103
104.version:
105        @echo "Checking SVN revision..."
106        @./version.sh
Note: See TracBrowser for help on using the repository browser.