summaryrefslogtreecommitdiff
path: root/xts5/common.mk
blob: fd929ffdef5ab6a65c0d7128896c6fb1e8bf72f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Common variables and rules for building xts

##########################
# Commands
##########################

# The code generator for turning .m files to .c files.
SUFFIXES = .m _m.c .c
MC = $(top_builddir)/xts5/src/bin/mc/mc
AM_V_mc = $(AM_V_mc_$(V))
AM_V_mc_ = $(AM_V_mc_$(AM_DEFAULT_VERBOSITY))
AM_V_mc_0 = @echo "  MC    " $@;
.m.c:
	$(AM_V_mc)TET_ROOT='$(TET_ROOT)' $(MC) -o $@ $<
.m_m.c:
	$(AM_V_mc)TET_ROOT='$(TET_ROOT)' $(MC) -m -o $@ $<

##################
# TET locations
##################

# The location of TET_ROOT.  This must not contain variable expansions.
# This must be set in the environment
TET_ROOT = $(abs_top_srcdir)

# The location of the TET directories
TETSRC = $(top_srcdir)/src/tet3
TETBUILD = $(top_builddir)/src/tet3

# TETINCDIR - The directory containing the TET API headers.
TETINCDIR = $(TETSRC)/inc

# TCM - The Test Control Manager
TCM = $(TETBUILD)/tcm/libtcmmain.la

# TCMCHILD - The Test Control Manager for files executed by tet_exec. 
TCMCHILD = $(TETBUILD)/tcm/libtcmchild.la

# APILIB - The TET API library
APILIB = $(TETSRC)/apilib/libapi.la

####################
# Xtest variables
####################

# XTESTHOST - name of host on which test suite clients are to be executed.
# This may be set to the value returned by a command which can be executed
# using the PATH you have set on your host, or may be set to a specific name.
# This is used to produce a resource file named .Xdefaults-$(XTESTHOST) in the
# test execution directory.
# The resource file is created when building the test for XGetDefault.
# This parameter is only used in the Makefile of the test for XGetDefault.
# Examples are:
# XTESTHOST=`hostname`
# XTESTHOST=`uname -n`
# XTESTHOST=triton
#
# SVR4	: XTESTHOST=`uname -n`
XTESTHOST = `hostname`

# XTESTFONTDIR - location of installed VSW5 compiled fonts
XTESTFONTDIR = $(TET_ROOT)/xts5/fonts

# XTESTSRC
XTESTSRC = $(top_srcdir)/xts5
XTESTBUILD = $(top_builddir)/xts5

# XTTESTLIB - the Xt Tests' libraries
XTTESTLIB = $(XTESTBUILD)/src/libXtTest/libXtTest.a

# XTESTLIB - the VSW5 library
XTESTLIB = $(XTESTBUILD)/src/lib/libxtest.a

# XSTLIB - library for linking the X Protocol tests
XSTLIB = $(XTESTBUILD)/src/libproto/libXst.a

# XTESTFONTLIB - supplementary library with font metrics.
XTESTFONTLIB = $(XTESTBUILD)/fonts/libfont.a

# XTESTXIMLIB - supplementary library for input methods.
XTESTXIMLIB = $(XTESTBUILD)/src/xim/libximtest.a

# XTESTINCDIR - the VSW5 header file directory
XTESTINCDIR = $(XTESTSRC)/include

################################
##### C compiler Directives Section
################################

# XP_OPEN_DIS - A choice of which code to build in the X Protocol library 
# to make an X server connection.
# This must be set to one of three possible values:
#
#	XlibXtst.c	Your Xlib includes enhancements to _XConnectDisplay 
#			ensuring maximum portable protocol test coverage.
#	XlibOpaque.c	You have a normal R4 Xlib or early R5 Xlib which you 
#			cannot patch to include the enhancements to 
#			_XConnectDisplay, and you cannot emulate these by 
#			building XlibNoXtst.c, so only client-native testing 
#			can be done portably, and no failure testing of 
#			XOpenDisplay can be done.
#			This option uses XOpenDisplay to make the connection, 
#			from which the file descriptor is recovered for 
#			our own use. XCloseDisplay shuts down the connection.
#	XlibNoXtst.c	As for XlibOpaque.c but you can use the R4/R5 
#			connection emulation supplied. (Note: R4/R5 independent)
#			This will ensure maximum protocol test coverage
#			but may not be portable to all platforms.
#
# Reasons for not being able to build XlibNoXtst.c might include:
# i)  different interfaces to connection setup and connection read/write;
# ii) different access control mechanisms.
# Refer to your Xlib documentation for further details.
#
XP_OPEN_DIS=XlibXtst.c
#XP_OPEN_DIS=XlibNoXtst.c
#XP_OPEN_DIS=XlibOpaque.c

# CFLAGS - Flags for C compiler
#
COMMON_CFLAGS = -I$(top_srcdir)/include -I$(TETINCDIR) -I$(XTESTINCDIR)

# XTS_LCFLAGS - Flags for C compiler for generic xts5 programs
XTS_LCFLAGS = $(COMMON_CFLAGS)

# XP_LCFLAGS - Flags for C compiler specific to the X Protocol tests.
XP_LCFLAGS = $(COMMON_CFLAGS)

# XT_LCFLAGS - Flags for C compiler specific to the Xt Toolkit tests.
XT_LCFLAGS = $(COMMON_CFLAGS)

# LIBS - List of libraries.
#
# XTS_LLIBS - Libraries for generic xts5 programs
XTS_LLIBS = $(XTESTXIMLIB) $(XTESTLIB) $(XTESTFONTLIB) $(APILIB)

# XP_LIBS - List of libraries specific to the X Protocol tests.
XP_LLIBS = $(XSTLIB) $(XTESTLIB) $(XTESTFONTLIB) $(APILIB)

# XT_LIBS - List of libraries specific to the Xt Toolkit tests.
XT_LLIBS = $(XTESTLIB) $(XTTESTLIB) $(APILIB)

################################
##### Pixel Validation Section.
################################

PVXTESTLIB = ${XTESTLIBDIR}/libxtstpv.a
PIXLIB = ${XTESTLIBDIR}/libpvt.a
PVLIBS = ${PVXTESTLIB} ${XTESTFONTLIB} ${PIXLIB} ${APILIB}

# SYSMATHLIB - system math library.  Directive to be given to the C compiler
# to cause the maths routines to be available.
# XXX - handle this in configure.ac
SYSMATHLIB = -lm

################################
##### Lint Section.
################################

LINT = lint
LINTFLAGS = $(INCLUDES) $(DEFINES) -u -n
LINTXTEST = $(XTESTLIBDIR)/llib-lxtest.ln
LINTXST = $(XTESTLIBDIR)/llib-lXst.ln
LINTFONTS = $(XTESTLIBDIR)/llib-lfonts.ln
LINTTCM = $(XTESTLIBDIR)/llib-ltcm.ln
LINTTCMC = $(XTESTLIBDIR)/llib-ltcmc.ln
LINTLIBS = $(LINTXTEST) $(LINTFONTS)

XP_LINTFLAGS = $(INCLUDES) $(XP_DEFINES) -u -n
XP_LINTLIBS = $(LINTXST) $(LINTXTEST) $(LINTFONTS)