Fix missing \ in Makefile.am
[moonshot-ui.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
2
3 SUBDIRS = po
4
5 bin_PROGRAMS = src/moonshot
6
7 AM_CFLAGS =
8
9 AM_CPPFLAGS = \
10         -include config.h \
11         -DLOCALEDIR=\""$(localedir)"\" \
12         $(moonshot_CFLAGS)
13
14 AM_VALAFLAGS = \
15         config.vapi \
16         --pkg gtk+-2.0
17
18 src_moonshot_SOURCES = \
19         src/moonshot-id.vala \
20         src/moonshot-add-dialog.vala \
21         src/moonshot-idcard-widget.vala \
22         src/moonshot-custom-vbox.vala \
23         src/moonshot-identities-manager.vala \
24         src/moonshot-window.vala \
25         src/moonshot-password-dialog.vala \
26         src/moonshot-utils.vala
27
28 src_moonshot_LDADD = \
29         $(moonshot_LIBS)
30
31 if OS_WIN32
32 src_moonshot_CFLAGS = -mwindows
33 AM_VALAFLAGS += --define=OS_WIN32
34 endif
35
36 if IPC_MSRPC
37
38 AM_CPPFLAGS += -Isrc
39
40 AM_VALAFLAGS += \
41         --pkg msrpc-1.0 \
42         --define=IPC_MSRPC
43
44 noinst_HEADERS = src/moonshot-msrpc.h
45
46 src_moonshot_SOURCES += \
47         src/moonshot-msrpc-server.vala \
48         src/moonshot-msrpc_s.c \
49         src/moonshot-msrpc.vapi
50
51 bin_PROGRAMS += src/msrpc-client
52
53 src_msrpc_client_SOURCES = \
54         src/msrpc-client.vala \
55         src/moonshot-msrpc_c.c \
56         src/moonshot-msrpc.vapi
57
58 src_msrpc_client_LDADD = \
59         $(moonshot_LIBS)
60
61 BUILT_SOURCES = src/moonshot-msrpc.h src/moonshot-msrpc_s.c src/moonshot-msrpc_c.c
62
63 DISTCLEANFILES = ${BUILT_SOURCES}
64
65 src/moonshot-msrpc.h: src/moonshot-msrpc.idl src/moonshot-msrpc.acf
66         ${AM_V_GEN} ${MIDL_WRAPPER} -o src -m "${MIDL}" $^
67
68 src/moonshot-msrpc_s.c: src/moonshot-msrpc.h
69
70 else
71
72 # IPC_DBUS
73
74 # DBus service file
75 dbusservicedir = $(datadir)/dbus-1/services
76 dbusservice_in_files = org.janet.Moonshot.service.in
77 dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
78
79 # Rule to make the service file with bindir expanded
80 $(dbusservice_DATA): $(dbusservice_in_files) Makefile
81         @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
82
83 AM_VALAFLAGS += \
84         --pkg dbus-glib-1 \
85         --define=IPC_DBUS
86
87 src_moonshot_SOURCES += src/moonshot-dbus-server.vala
88
89 bin_PROGRAMS += src/dbus-client
90
91 src_dbus_client_SOURCES = \
92         src/dbus-client.vala
93
94 src_dbus_client_LDADD = \
95         $(moonshot_LIBS)
96
97 CLEANFILES = $(dbusservice_DATA)
98 EXTRA_DIST = $(dbusservice_in_files)
99
100 endif
101
102
103 if OS_WIN32
104
105 ## A couple of Windows-specific targets:
106
107 ## 1. Icons. You must have gnome-icon-theme and gnome-icon-theme-symbolic installed
108 ##    in c:/build prefix; and ImageMagick installed in c:/tools/ImageMagick. This
109 ##    pulls in the icons required by moonshot and converts svg's to png's (we have
110 ##    no svg support built in to Windows Gtk+ right now).
111
112 icons:
113         mkdir -p share/icons
114         cp c:/build/share/icons/gnome/48x48/status/avatar-default.png share/icons
115         "${IMAGEMAGICK_CONVERT}" -background none c:/build/share/icons/gnome/scalable/actions/edit-clear-symbolic.svg -size 13x13 share/icons/edit-clear-symbolic.png
116         "${IMAGEMAGICK_CONVERT}" -background none c:/build/share/icons/gnome/scalable/actions/edit-find-symbolic.svg -size 13x13 share/icons/edit-find-symbolic.png
117
118
119 ## 2. Installer. You must have the Windows Installer XML toolkit version 3.5
120 ##    installed in its default path. Note that this requires at least .NET
121 ##    runtime with service packs 1 and 2. The installer picks up files from
122 ##    the build prefix and mingw dir; you must change these if you have them
123 ##    in different locations I'm afraid.
124
125 installer: moonshot.msi
126
127 moonshot.msi: windows/app.wxs
128         "${WIX_CANDLE}" $<
129         "${WIX_LIGHT}" -b c:/build -b c:/tools/mingw -o moonshot.msi app.wixobj
130
131 endif