1 2SUBDIRS = redshift-gtk 3 4# I18n 5localedir = $(datadir)/locale 6AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" 7 8# redshift Program 9bin_PROGRAMS = redshift 10 11redshift_SOURCES = \ 12 colorramp.c colorramp.h \ 13 config-ini.c config-ini.h \ 14 gamma-dummy.c gamma-dummy.h \ 15 hooks.c hooks.h \ 16 location-manual.c location-manual.h \ 17 options.c options.h \ 18 pipeutils.c pipeutils.h \ 19 redshift.c redshift.h \ 20 signals.c signals.h \ 21 solar.c solar.h \ 22 systemtime.c systemtime.h 23 24EXTRA_redshift_SOURCES = \ 25 gamma-drm.c gamma-drm.h \ 26 gamma-wl.c gamma-wl.h \ 27 gamma-randr.c gamma-randr.h \ 28 gamma-vidmode.c gamma-vidmode.h \ 29 gamma-quartz.c gamma-quartz.h \ 30 gamma-w32gdi.c gamma-w32gdi.h \ 31 location-geoclue2.c location-geoclue2.h \ 32 location-corelocation.m location-corelocation.h \ 33 windows/appicon.rc \ 34 windows/versioninfo.rc 35 36AM_CFLAGS = 37redshift_LDADD = @LIBINTL@ 38EXTRA_DIST = windows/redshift.ico 39 40if ENABLE_DRM 41redshift_SOURCES += gamma-drm.c gamma-drm.h 42AM_CFLAGS += $(DRM_CFLAGS) 43redshift_LDADD += \ 44 $(DRM_LIBS) $(DRM_CFLAGS) 45endif 46 47if ENABLE_WAYLAND 48redshift_SOURCES += gamma-wl.c gamma-wl.h os-compatibility.c os-compatibility.h 49 50AM_CFLAGS += $(WAYLAND_CFLAGS) 51 52redshift_LDADD += \ 53 $(WAYLAND_LIBS) $(WAYLAND_CFLAGS) 54 55nodist_redshift_SOURCES = \ 56 gamma-control-protocol.c \ 57 gamma-control-client-protocol.h \ 58 orbital-authorizer-protocol.c \ 59 orbital-authorizer-client-protocol.h 60 61BUILT_SOURCES = \ 62 gamma-control-protocol.c \ 63 gamma-control-client-protocol.h \ 64 orbital-authorizer-protocol.c \ 65 orbital-authorizer-client-protocol.h 66 67EXTRA_DIST += gamma-control.xml orbital-authorizer.xml 68endif 69 70if ENABLE_RANDR 71redshift_SOURCES += gamma-randr.c gamma-randr.h 72AM_CFLAGS += $(XCB_CFLAGS) $(XCB_RANDR_CFLAGS) 73redshift_LDADD += \ 74 $(XCB_LIBS) $(XCB_CFLAGS) \ 75 $(XCB_RANDR_LIBS) $(XCB_RANDR_CFLAGS) 76endif 77 78if ENABLE_VIDMODE 79redshift_SOURCES += gamma-vidmode.c gamma-vidmode.h 80AM_CFLAGS += $(X11_CFLAGS) $(XF86VM_CFLAGS) 81redshift_LDADD += \ 82 $(X11_LIBS) $(X11_CFLAGS) \ 83 $(XF86VM_LIBS) $(XF86VM_CFLAGS) 84endif 85 86if ENABLE_QUARTZ 87redshift_SOURCES += gamma-quartz.c gamma-quartz.h 88AM_CFLAGS += $(QUARTZ_CFLAGS) 89redshift_LDADD += \ 90 $(QUARTZ_LIBS) $(QUARTZ_CFLAGS) 91endif 92 93if ENABLE_WINGDI 94redshift_SOURCES += gamma-w32gdi.c gamma-w32gdi.h 95redshift_LDADD += -lgdi32 96endif 97 98 99if ENABLE_GEOCLUE2 100redshift_SOURCES += location-geoclue2.c location-geoclue2.h 101AM_CFLAGS += \ 102 $(GEOCLUE2_CFLAGS) 103redshift_LDADD += \ 104 $(GEOCLUE2_LIBS) $(GEOCLUE2_CFLAGS) 105endif 106 107# Build CoreLocation module as a separate convenience 108# library since it is using a separate compiler 109# (Objective C). 110 111if ENABLE_CORELOCATION 112noinst_LTLIBRARIES = liblocation-corelocation.la 113liblocation_corelocation_la_SOURCES = \ 114 location-corelocation.m location-corelocation.h 115liblocation_corelocation_la_OBJCFLAGS = \ 116 $(CORELOCATION_CFLAGS) 117liblocation_corelocation_la_LIBADD = \ 118 $(CORELOCATION_CFLAGS) $(CORELOCATION_LIBS) 119redshift_LDADD += liblocation-corelocation.la 120endif 121 122 123# Windows resources 124if ENABLE_WINDOWS_RESOURCE 125redshift_SOURCES += windows/appicon.rc windows/versioninfo.rc 126endif 127 128.rc.o: 129 $(AM_V_GEN)$(WINDRES) -I$(top_builddir) -i $< -o $@ 130 131CLEANFILES = *-protocol.c *-client-protocol.h 132 133%-protocol.c : $(srcdir)/%.xml 134 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(WAYLAND_SCANNER) private-code < $< > $@ 135 136%-client-protocol.h : $(srcdir)/%.xml 137 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(WAYLAND_SCANNER) client-header < $< > $@ 138