source: trunk/Makefile @ 205

Last change on this file since 205 was 205, checked in by joshe, 16 years ago

Have make print a helpful error message if configure has not been run.

File size: 1.7 KB
Line 
1-include Makefile.config
2include Makefile.common
3
4ifndef CONFIGURE_RUN
5$(error You must run ./configure first)
6endif
7
8ifneq ($(SYSTEM),Darwin)
9
10TARGETS = .cli
11ifeq ($(GTK),yes)
12TARGETS += .gtk
13endif
14ifeq ($(SYSTEM),BeOS)
15TARGETS += .beos
16endif
17
18all: $(TARGETS)
19
20.lib:
21        @echo "* Building libtransmission"
22        @$(MAKE) -C libtransmission
23
24.cli: .lib
25        @echo "* Building Transmission CLI client"
26        @$(MAKE) -C cli
27
28.gtk: .lib
29        @echo "* Building Transmission GTK+ client"
30        @$(MAKE) -C gtk
31
32.beos: .lib
33        @echo "* Building Transmission BeOS client"
34        @make -C beos
35
36clean:
37        @$(MAKE) -C libtransmission clean
38        @$(MAKE) -C cli clean
39ifeq ($(GTK),yes)
40        @$(MAKE) -C gtk clean
41endif
42ifeq ($(SYSTEM),BeOS)
43        @$(MAKE) -C beos clean
44endif
45
46else
47
48all:
49        @$(MAKE) -C macosx
50        @xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
51
52clean:
53        @xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
54        @$(MAKE) -C macosx clean
55
56MAKELINK = printf "[InternetShortcut]\nURL=http://%s\n"
57
58package:
59        $(RM) tmp "Transmission $(VERSION_STRING)" \
60            Transmission-$(VERSION_STRING).dmg && \
61          mkdir -p tmp && \
62          cp -r macosx/Transmission.app tmp/ && \
63          cp AUTHORS tmp/AUTHORS.txt && \
64          cp LICENSE tmp/LICENSE.txt && \
65          cp NEWS tmp/NEWS.txt && \
66          strip -S tmp/Transmission.app/Contents/MacOS/Transmission && \
67          $(MAKELINK) "transmission.m0k.org/" > tmp/Homepage.url && \
68          $(MAKELINK) "transmission.m0k.org/forum" > tmp/Forums.url && \
69          $(MAKELINK) "transmission.m0k.org/contribute.php" > tmp/Contribute.url && \
70          mv tmp "Transmission $(VERSION_STRING)" && \
71          hdiutil create -format UDZO -srcfolder \
72            "Transmission $(VERSION_STRING)" Transmission-$(VERSION_STRING).dmg && \
73          rm -rf "Transmission $(VERSION_STRING)"
74
75endif
Note: See TracBrowser for help on using the repository browser.