1 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
6 lib_LTLIBRARIES = libmoonshot/libmoonshot.la
12 AM_CFLAGS = -g -O0 -Wall
16 -DLOCALEDIR=\""$(localedir)"\" \
17 -DMOONSHOT_LAUNCH_SCRIPT='"$(pkglibexecdir)/moonshot-dbus-launch"' \
18 -I$(top_srcdir)/libmoonshot \
19 -I$(top_builddir)/libmoonshot
23 --vapidir=$(top_srcdir)/vapi \
27 libmoonshot_libmoonshot_la_CPPFLAGS = \
28 $(libmoonshot_CFLAGS) \
31 libmoonshot_libmoonshot_la_SOURCES = libmoonshot/libmoonshot-common.c
33 libmoonshot_libmoonshot_la_LIBADD = $(libmoonshot_LIBS)
35 include_HEADERS = libmoonshot/libmoonshot.h
36 noinst_HEADERS = libmoonshot/libmoonshot-common.h
38 src_moonshot_SOURCES = \
39 src/moonshot-identity-manager-app.vala \
40 src/moonshot-identity-management-view.vala \
41 src/moonshot-local-flat-file-store.vala \
42 src/moonshot-idcard-store.vala \
43 src/moonshot-id.vala \
44 src/moonshot-add-dialog.vala \
45 src/moonshot-idcard-widget.vala \
46 src/moonshot-custom-vbox.vala \
47 src/moonshot-identities-manager.vala \
48 src/moonshot-identity-request.vala \
49 src/moonshot-server.vala \
50 src/moonshot-password-dialog.vala \
51 src/moonshot-provisioning-common.vala \
52 src/moonshot-utils.vala
54 src_moonshot_webp_SOURCES = \
55 src/moonshot-webp-parser.vala \
56 src/moonshot-provisioning-common.vala \
59 src_moonshot_VALAFLAGS = --pkg gdk-2.0 --pkg gtk+-2.0 --pkg gee-1.0 $(AM_VALAFLAGS)
60 src_moonshot_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
61 src_moonshot_LDADD = $(moonshot_LIBS)
62 src_moonshot_LDFLAGS = -g -O0
64 src_moonshot_webp_VALAFLAGS = --vapidir=$(top_srcdir)/libmoonshot --pkg gtk+-2.0 --pkg gdk-2.0 --pkg libmoonshot $(AM_VALAFLAGS)
65 src_moonshot_webp_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
66 src_moonshot_webp_LDADD = $(moonshot_LIBS) ${top_builddir}/libmoonshot/libmoonshot.la
70 libmoonshot_libmoonshot_la_LDFLAGS = -no-undefined
72 src_moonshot_CFLAGS = -mwindows
73 src_moonshot_webp_CFLAGS = -mwindows
75 AM_CPPFLAGS += -DOS_WIN32
76 AM_VALAFLAGS += --define=OS_WIN32
78 noinst_DATA = libmoonshot/libmoonshot.lib
80 # Build the MSVC lib. The sed hack fixes execution in the case that
81 # the MSVC toolchain isn't in the PATH.
82 libmoonshot/libmoonshot.lib: libmoonshot/libmoonshot.def
83 PATH="$(shell echo "${MSVC_LIB}" | sed -e s,/VC/bin/lib,/Common7/IDE,)":$$PATH "${MSVC_LIB}" -def:$< -out:$@ -machine:x86
89 AM_CPPFLAGS += -DOS_MACOS $(MAC_CFLAGS)
90 AM_VALAFLAGS += --define=OS_MACOS --pkg gtk-mac-integration
91 moonshot_LIBS += $(MAC_LIBS)
92 src_moonshot_LDADD += $(MAC_LIBS)
97 ## Installing mime type data
98 mimedir = $(datadir)/mime/packages
99 mime_DATA = webprovisioning/moonshot.xml
102 dotdesktopdir = $(datadir)/applications
103 dotdesktop_DATA = moonshot.desktop moonshot-webp.desktop
112 --pkg moonshot-msrpc.vapi --pkg msrpc-1.0 \
115 BUILT_SOURCES = libmoonshot/moonshot-msrpc.h \
116 libmoonshot/moonshot-msrpc_s.c \
117 libmoonshot/moonshot-msrpc_c.c
119 DISTCLEANFILES = ${BUILT_SOURCES}
121 libmoonshot/moonshot-msrpc.h: libmoonshot/moonshot-msrpc.idl libmoonshot/moonshot-msrpc.acf
122 ${AM_V_GEN} ${MIDL_WRAPPER} -o libmoonshot -m "${MIDL}" $^
124 libmoonshot/moonshot-msrpc_s.c: libmoonshot/moonshot-msrpc.h
125 libmoonshot/moonshot-msrpc_c.c: libmoonshot/moonshot-msrpc.h
127 libmoonshot_libmoonshot_la_SOURCES += \
128 libmoonshot/libmoonshot-msrpc.c
131 nodist_src_moonshot_SOURCES = \
132 libmoonshot/moonshot-msrpc_s.c
134 nodist_libmoonshot_libmoonshot_la_SOURCES = \
135 libmoonshot/moonshot-msrpc_c.c
142 dbusservicedir = $(datadir)/dbus-1/services
144 dbusservice_in_files = org.janet.Moonshot.service.mac
145 dbusservice_DATA = $(dbusservice_in_files:.service.mac=.service)
147 dbusservice_in_files = org.janet.Moonshot.service.in
148 dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
151 # Rule to make the service file with bindir expanded
152 $(dbusservice_DATA): $(dbusservice_in_files) Makefile
153 @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
155 libmoonshot_libmoonshot_la_SOURCES += libmoonshot/libmoonshot-dbus.c
157 CLEANFILES = $(dbusservice_DATA)
162 --define=IPC_DBUS_GLIB \
172 EXTRA_DIST = webprovisioning/moonshot.xml $(dbusservice_in_files) \
177 examples/service-selection \
180 examples_service_selection_SOURCES = examples/service-selection.c
181 examples_service_selection_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
182 examples_service_selection_LDADD = ${top_builddir}/libmoonshot/libmoonshot.la $(moonshot_LIBS)
184 examples_client_SOURCES = examples/client.c
185 examples_client_CPPFLAGS = $(libmoonshot_CFLAGS) $(AM_CPPFLAGS)
186 examples_client_LDADD = ${top_builddir}/libmoonshot/libmoonshot.la
188 tests_basic_SOURCES = tests/basic.c
189 tests_basic_CPPFLAGS = $(moonshot_CFLAGS) $(AM_CPPFLAGS)
190 tests_basic_LDADD = ${top_builddir}/libmoonshot/libmoonshot.la $(moonshot_LIBS)
194 ## "${UPDATE_MIME_DATABASE}" $(datadir)/mime
195 ## "${UPDATE_DESKTOP_DATABASE}" $(datadir)/applications
197 ## "${UPDATE_MIME_DATABASE}" $(datadir)/mime
198 ## "${UPDATE_DESKTOP_DATABASE}" $(datadir)/applications
203 ## A couple of Windows-specific targets:
205 ## 1. Icons. You must have gnome-icon-theme and gnome-icon-theme-symbolic installed
206 ## in the install prefix; and ImageMagick installed in c:/tools/ImageMagick. This
207 ## pulls in the icons required by moonshot and converts svg's to png's (we have
208 ## no svg support built in to Windows Gtk+ right now).
212 cp ${prefix}/share/icons/gnome/48x48/status/avatar-default.png share/icons
213 "${IMAGEMAGICK_CONVERT}" -background none ${prefix}/share/icons/gnome/scalable/actions/edit-clear-symbolic.svg -size 13x13 share/icons/edit-clear-symbolic.png
214 "${IMAGEMAGICK_CONVERT}" -background none ${prefix}/share/icons/gnome/scalable/actions/edit-find-symbolic.svg -size 13x13 share/icons/edit-find-symbolic.png
217 ## 2. Installer. You must have the Windows Installer XML toolkit version 3.5
218 ## installed in its default path. Note that this requires at least .NET
219 ## runtime with service packs 1 and 2. The installer picks up files from
220 ## the build prefix and mingw dir; you must change these if you have them
221 ## in different locations I'm afraid.
223 installer: moonshot.msi
225 moonshot.msi: windows/app.wxs windows/config.wxi $(bin_PROGRAMS)
227 "${WIX_LIGHT}" -b ${prefix} -b ${prefix}/mingw -o moonshot.msi app.wixobj
232 ## Mac-specific targets
238 cp mac/icons/process-stop.png share/icons
239 cp mac/icons/edit-find.png share/icons
240 cp mac/icons/avatar-default.png share/icons
243 ## gtk-app-bundler must be installed
244 ## moonshot-ui.app will be built in moonshot/mac-client-installer/moonshot-ui/
246 gtk-mac-bundler ./mac/moonshot-ui.bundle
248 ## 3: Installer Package
250 installerdir = $(HOME)/moonshot/mac-client-installer