summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 6b3f3c8275a697915471be6fe70762fa0297c5e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
NULL =

public_icons_themes = \
        hicolor \
        $(NULL)

public_icons = \
        hicolor_apps_scalable_transmission-remote-gtk.svg \
	hicolor_apps_16x16_transmission-remote-gtk.png \
	hicolor_apps_24x24_transmission-remote-gtk.png \
	hicolor_apps_48x48_transmission-remote-gtk.png \
	hicolor_apps_22x22_transmission-remote-gtk.png \
	hicolor_apps_32x32_transmission-remote-gtk.png \
        $(NULL)

EXTRA_DIST = transmission-remote-gtk.desktop.in
CLEANFILES = transmission-remote-gtk.desktop

desktopdir = $(datadir)/applications
desktop_DATA = transmission-remote-gtk.desktop

bin_PROGRAMS = transmission-remote-gtk
INCLUDES = --pedantic -Wall -Wno-format -Wno-overflow -I.. -DTRGLICENSE=\""$(trglicense)"\" $(libcurl_CFLAGS) $(jsonglib_CFLAGS) $(gthread_CFLAGS) $(gtk_CFLAGS) $(gio_CFLAGS) $(unique_CFLAGS) $(notify_CFLAGS) $(libproxy_CFLAGS) -std=gnu99
		
transmission_remote_gtk_SOURCES = main.c \
	  requests.c \
	  json.c \
	  trg-main-window.c \
	  util.c \
	  trg-about-window.c \
	  torrent.c \
	  tpeer.c \
  	  tfile.c \
	  session-get.c \
	  trg-client.c \
	  trg-preferences-dialog.c \
	  hig.c \
	  trg-torrent-tree-view.c \
	  trg-tree-view.c \
	  trg-torrent-model.c \
	  trg-peers-model.c \
	  trg-peers-tree-view.c \
	  trg-model.c \
	  trg-files-model.c \
	  trg-files-tree-view.c \
	  trg-state-selector.c \
	  trg-general-panel.c \
	  trg-toolbar.c \
	  trg-menu-bar.c \
	  trg-status-bar.c \
	  trg-trackers-tree-view.c \
	  trg-trackers-model.c \
	  trg-torrent-props-dialog.c \
	  trg-torrent-add-url-dialog.c \
	  trg-json-widgets.c \
	  trg-cell-renderer-speed.c \
	  trg-cell-renderer-size.c \
	  trg-cell-renderer-ratio.c \
	  trg-cell-renderer-eta.c \
	  trg-remote-prefs-dialog.c \
	  trg-cell-renderer-priority.c \
	  trg-cell-renderer-epoch.c \
	  trg-cell-renderer-numgteqthan.c \
	  trg-torrent-move-dialog.c \
	  trg-stats-dialog.c \
	  trg-torrent-graph.c \
	  trg-torrent-add-dialog.c \
	  trg-file-parser.c \
	  bencode.c \
	  trg-prefs.c \
	  trg-destination-combo.c \
	  remote-exec.c \
	  $(NULL)

transmission_remote_gtk_LDFLAGS = -lm $(jsonglib_LIBS) $(gtk_LIBS) $(gthread_LIBS) $(GEOIP_LIBS) $(gio_LIBS) $(unique_LIBS) $(notify_LIBS) $(libproxy_LIBS) $(libcurl_LIBS)

if WIN32
.rc.o:
	windres $^ -o $@
%.o : %.rc
	windres $^ -o $@

AM_CFLAGS = -mms-bitfields -mwin32 -mwindows
transmission_remote_gtk_LDFLAGS += -Wl,--subsystem,windows
transmission_remote_gtk_SOURCES += win32.rc
endif

install-data-local: install-icons update-icon-cache

gtk_update_icon_cache = gtk-update-icon-cache -f -t

update-icon-cache:
	@-if test -z "$(DESTDIR)"; then \
		echo "Updating Gtk icon cache."; \
		for theme in $(public_icons_themes); do \
			$(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
	done; \
	else \
		echo "*** Icon cache not updated.  After (un)install, run this:"; \
		for theme in $(public_icons_themes); do \
			echo "***   $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
		done; \
	fi

install-icons:
	for icon in $(public_icons); do \
                THEME=`echo $$icon | cut -d_ -f1`; \
                CONTEXT=`echo $$icon | cut -d_ -f2`; \
                SIZE=`echo $$icon | cut -d_ -f3`; \
                ICONFILE=`echo $$icon | cut -d_ -f4`; \
                mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
                $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
        done; \
        for icon in $(private_icons); do \
                THEME=`echo $$icon | cut -d_ -f1`; \
                CONTEXT=`echo $$icon | cut -d_ -f2`; \
                SIZE=`echo $$icon | cut -d_ -f3`; \
                ICONFILE=`echo $$icon | cut -d_ -f4`; \
                mkdir -p $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
                $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
        done

transmission-remote-gtk.desktop: transmission-remote-gtk.desktop.in
	sed -e 's,@bindir\@,$(bindir),g' <transmission-remote-gtk.desktop.in > $@