source: trunk/Makefile @ 134

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

Started to switch to a Makefile-based build system (still very incomplete,
so the Jamfile are still there).
Set a few svn:ignore properties.

File size: 1.6 KB
Line 
1include Makefile.config
2include Makefile.common
3
4SRCS = transmissioncli.c
5OBJS = $(SRCS:%.c=%.o)
6
7CFLAGS += -Ilibtransmission
8
9all: transmissioncli
10ifeq ($(SYSTEM),Darwin)
11        $(MAKE) -C macosx
12endif
13
14transmissioncli: lib $(OBJS)
15        $(CC) -o $@ $(OBJS) libtransmission/libtransmission.a $(LDFLAGS)
16
17lib:
18        $(MAKE) -C libtransmission
19
20%.o: %.c Makefile.config Makefile.common Makefile
21        $(CC) $(CFLAGS) -o $@ -c $<
22
23package-macosx:
24        $(RM) tmp "Transmission $(VERSION_STRING)" \
25            Transmission-$(VERSION_STRING).dmg && \
26          mkdir -p tmp/Transmission.app && \
27          ditto macosx/build/Debug/Transmission.app tmp/Transmission.app && \
28          ditto AUTHORS tmp/AUTHORS.txt && \
29          ditto LICENSE tmp/LICENSE.txt && \
30          ditto NEWS tmp/NEWS.txt && \
31          strip -S tmp/Transmission.app/Contents/MacOS/Transmission && \
32          ( echo "[InternetShortcut]"; \
33            echo "URL=http://transmission.m0k.org/" ) > \
34                tmp/Homepage.url && \
35          ( echo "[InternetShortcut]"; \
36            echo "URL=http://transmission.m0k.org/forum/" ) > \
37                tmp/Forums.url && \
38          ( echo "[InternetShortcut]"; \
39            echo "URL=http://transmission.m0k.org/contribute.php" ) > \
40            tmp/Contribute.url && \
41          mv tmp "Transmission $(VERSION_STRING)" && \
42          hdiutil create -format UDZO -srcfolder \
43            "Transmission $(VERSION_STRING)" Transmission-$(VERSION_STRING).dmg && \
44          rm -rf "Transmission $(VERSION_STRING)"
45
46clean:
47        $(RM) transmissioncli $(OBJS)
48        $(MAKE) -C libtransmission clean
49ifeq ($(SYSTEM),Darwin)
50        $(MAKE) -C macosx clean
51endif
52
53.depend: $(SRCS) Makefile
54        $(RM) .depend
55        $(foreach SRC, $(SRCS), $(CC) -MM -Ilibtransmission $(SRC) >> .depend;)
56
57include .depend
Note: See TracBrowser for help on using the repository browser.