1#
2#  Copyright 2005  Red Hat, Inc.
3#
4#  Permission to use, copy, modify, distribute, and sell this software and its
5#  documentation for any purpose is hereby granted without fee, provided that
6#  the above copyright notice appear in all copies and that both that
7#  copyright notice and this permission notice appear in supporting
8#  documentation, and that the name of Red Hat not be used in
9#  advertising or publicity pertaining to distribution of the software without
10#  specific, written prior permission.  Red Hat makes no
11#  representations about the suitability of this software for any purpose.  It
12#  is provided "as is" without express or implied warranty.
13#
14#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20#  PERFORMANCE OF THIS SOFTWARE.
21
22bin_PROGRAMS = xdm
23
24AM_CPPFLAGS = -I$(top_srcdir)/include
25AM_CFLAGS = $(CWARNFLAGS) $(XDM_CFLAGS) $(SYSTEMD_DAEMON_CFLAGS)
26
27# The xdm binary needs to export symbols so that they can be used from
28# libXdmGreet.so loaded through a dlopen call from session.c
29AM_LDFLAGS = $(XDM_LIBS) $(SYSTEMD_DAEMON_LIBS) -export-dynamic
30
31xdm_SOURCES =		\
32        access.c	\
33        auth.c		\
34        choose.c	\
35        daemon.c	\
36        dm.c		\
37        dpylist.c	\
38        error.c		\
39        file.c		\
40        genauth.c	\
41        mitauth.c	\
42        netaddr.c	\
43        policy.c	\
44        protodpy.c	\
45        reset.c		\
46        resource.c	\
47        server.c	\
48        session.c	\
49        socket.c	\
50        util.c		\
51        xdmcp.c
52
53if HAS_XDM_AUTH
54AM_CFLAGS +=  -DHASXDMAUTH
55xdm_SOURCES += xdmauth.c
56endif
57
58if !HAVE_ARC4RANDOM
59xdm_SOURCES += prngc.c
60endif
61
62if HAS_SECURE_RPC
63AM_CFLAGS += -DSECURE_RPC
64xdm_SOURCES += rpcauth.c
65endif
66
67if HAS_KERBEROS_FIVE
68xdm_SOURCES += krb5auth.c
69endif
70
71if LINT
72ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) \
73		$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
74
75lint:
76	$(LINT) $(ALL_LINT_FLAGS) $(xdm_SOURCES) $(XDM_LIBS)
77
78endif LINT
79