1c81d8f5eSmrg# Copyright (c) 2008 Apple Inc.
2c81d8f5eSmrg#
3c81d8f5eSmrg# Permission is hereby granted, free of charge, to any person
4c81d8f5eSmrg# obtaining a copy of this software and associated documentation files
5c81d8f5eSmrg# (the "Software"), to deal in the Software without restriction,
6c81d8f5eSmrg# including without limitation the rights to use, copy, modify, merge,
7c81d8f5eSmrg# publish, distribute, sublicense, and/or sell copies of the Software,
8c81d8f5eSmrg# and to permit persons to whom the Software is furnished to do so,
9c81d8f5eSmrg# subject to the following conditions:
10c81d8f5eSmrg#
11c81d8f5eSmrg# The above copyright notice and this permission notice shall be
12c81d8f5eSmrg# included in all copies or substantial portions of the Software.
13c81d8f5eSmrg#
14c81d8f5eSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15c81d8f5eSmrg# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16c81d8f5eSmrg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17c81d8f5eSmrg# NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
18c81d8f5eSmrg# HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19c81d8f5eSmrg# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20c81d8f5eSmrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21c81d8f5eSmrg# DEALINGS IN THE SOFTWARE.
22c81d8f5eSmrg#
23c81d8f5eSmrg# Except as contained in this notice, the name(s) of the above
24c81d8f5eSmrg# copyright holders shall not be used in advertising or otherwise to
25c81d8f5eSmrg# promote the sale, use or other dealings in this Software without
26c81d8f5eSmrg# prior written authorization.
27c81d8f5eSmrg
28c81d8f5eSmrginclude $(top_srcdir)/cpprules.in
29c81d8f5eSmrg
30d73e0b87Smrgxinitrcdir = $(XINITDIR)
31c81d8f5eSmrgprivstartxdir = $(xinitrcdir)/privileged_startx.d
32c81d8f5eSmrg
33d73e0b87Smrglibexec_PROGRAMS = privileged_startx
34c81d8f5eSmrgprivstartx_SCRIPTS = 10-tmpdirs 20-font_cache
35c81d8f5eSmrg
36c81d8f5eSmrgAM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\"
37d73e0b87SmrgCPP_FILES_FLAGS = -D__libexecdir__="$(libexecdir)" -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" -DBUNDLE_ID_PREFIX="$(bundleidprefix)"
38c81d8f5eSmrg
39c81d8f5eSmrgdist_privileged_startx_SOURCES = \
40c81d8f5eSmrg	server.c \
41c81d8f5eSmrg	client.c \
42c81d8f5eSmrg	privileged_startx.c
43c81d8f5eSmrg
44c81d8f5eSmrgnodist_privileged_startx_SOURCES = \
45c81d8f5eSmrg	privileged_startxServer.c \
46c81d8f5eSmrg	privileged_startxUser.c
47c81d8f5eSmrg
48c81d8f5eSmrgBUILT_SOURCES = \
49c81d8f5eSmrg	privileged_startxServer.c \
50c81d8f5eSmrg	privileged_startxUser.c \
51c81d8f5eSmrg	privileged_startxServer.h \
52c81d8f5eSmrg	privileged_startx.h
53c81d8f5eSmrg
54c81d8f5eSmrg$(bundleidprefix).privileged_startx.plist.cpp: privileged_startx.plist.cpp  
55c81d8f5eSmrg	cp $< $@
56c81d8f5eSmrg
57c81d8f5eSmrglaunchdaemons_PRE = $(bundleidprefix).privileged_startx.plist.cpp
58c81d8f5eSmrglaunchdaemons_DATA = $(launchdaemons_PRE:plist.cpp=plist)
59c81d8f5eSmrg
60c81d8f5eSmrg10-tmpdirs: 10-tmpdirs.cpp Makefile
61c81d8f5eSmrg20-font_cache: 20-font_cache.cpp Makefile
62c81d8f5eSmrg
63c81d8f5eSmrgCLEANFILES = \
64c81d8f5eSmrg	$(privstartx_SCRIPTS) \
65c81d8f5eSmrg	$(BUILT_SOURCES) \
66c81d8f5eSmrg	$(launchdaemons_DATA) \
67c81d8f5eSmrg	$(bundleidprefix).privileged_startx.plist.cpp
68c81d8f5eSmrg
69c81d8f5eSmrgEXTRA_DIST = \
70c81d8f5eSmrg	10-tmpdirs.cpp \
71c81d8f5eSmrg	20-font_cache.cpp \
72c81d8f5eSmrg	privileged_startx.plist.cpp \
73c81d8f5eSmrg	privileged_startx.defs \
74c81d8f5eSmrg	privileged_startx_types.h
75c81d8f5eSmrg
76c81d8f5eSmrg$(BUILT_SOURCES): $(srcdir)/privileged_startx.defs
77c81d8f5eSmrg	mig -sheader privileged_startxServer.h $(srcdir)/privileged_startx.defs
78