source: branches/compat-10.2/Makefile @ 188

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

Only build the GTK interface if enabled

File size: 1.7 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
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
24%.o: %.c Makefile.config Makefile.common Makefile
25        $(CC) $(CFLAGS) -o $@ -c $<
26
27clean:
28        $(RM) transmissioncli $(OBJS)
29        $(MAKE) -C libtransmission clean
30ifeq ($(GTK),yes)
31        $(MAKE) -C gtk clean
32endif
33
34.depend: $(SRCS) Makefile
35        $(RM) .depend
36        $(foreach SRC, $(SRCS), $(CC) -MM -Ilibtransmission $(SRC) >> .depend;)
37
38include .depend
39
40else
41
42all:
43        make -C macosx
44        xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
45
46clean:
47        xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
48        make -C macosx clean
49
50MAKELINK = printf "[InternetShortcut]\nURL=http://%s\n"
51
52package:
53        $(RM) tmp "Transmission $(VERSION_STRING)" \
54            Transmission-$(VERSION_STRING).dmg && \
55          mkdir -p tmp && \
56          cp -r Transmission.app tmp/ && \
57          cp AUTHORS tmp/AUTHORS.txt && \
58          cp LICENSE tmp/LICENSE.txt && \
59          cp NEWS tmp/NEWS.txt && \
60          strip -S tmp/Transmission.app/Contents/MacOS/Transmission && \
61          $(MAKELINK) "transmission.m0k.org/" > tmp/Homepage.url && \
62          $(MAKELINK) "transmission.m0k.org/forum" > tmp/Forums.url && \
63          $(MAKELINK) "transmission.m0k.org/contribute.php" > tmp/Contribute.url && \
64          mv tmp "Transmission $(VERSION_STRING)" && \
65          hdiutil create -format UDZO -srcfolder \
66            "Transmission $(VERSION_STRING)" Transmission-$(VERSION_STRING).dmg && \
67          rm -rf "Transmission $(VERSION_STRING)"
68
69endif
Note: See TracBrowser for help on using the repository browser.