source: branches/compat-10.2/Makefile @ 185

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

Adds Makefile for GTK interface

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