source: trunk/Makefile @ 191

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

Merge compat-10.2 branch. This adds Jaguar compatibility on OS X, and
completes the Jam -> Make/XCode switch. Hope it doesn't break too much.

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