aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/dps/Imakefile
blob: 83f545690284f7797125231a20c1c31b3ce22fed (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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
XCOMM $XFree86: xc/lib/dps/Imakefile,v 1.16tsi Exp $

#define DoNormalLib NormalLibDps
#define DoSharedLib SharedLibDps
#define DoExtraLib SharedLibDps
#define DoDebugLib DebugLibDps
#define DoProfileLib ProfileLibDps
#define LibName NX_dps
#define SoRev SODPSREV
#define IncSubdir DPS

#ifdef SharedDPSReqs
REQUIREDLIBS = SharedDPSReqs
#endif

XCOMM  The Client Library uses definitions just like Xlib for network
XCOMM  capabilities, such as TCPCONN, UNIXCONN, and DNETCONN.  See
XCOMM  csconndi.c and csopendi.c

XCOMM The connection code should be rewritten to use xtrans.  The STREAMSCONN
XCOMM code here needs work.  For now force ConnectionFlags to be
XCOMM  -DTCPCONN -DUNIXCONN

#undef ConnectionFlags
#define ConnectionFlags -DTCPCONN -DUNIXCONN

        DEFINES = -DXDPS -DCSDPS ConnectionFlags
            CAT = cat
            SED = sed
            AWK = awk
           SORT = sort
         PSWRAP = PsWrap

COMMONOBJECTFILES = \
	dpsclient.o\
	dpsprintf.o\
	dpsexcept.o\
	dpsdict.o\
	dpsabbrev.o

COMMONSOURCEFILES = \
	dpsclient.c\
	dpsprintf.c\
	dpsexcept.c\
	dpsdict.c\
	dpsabbrev.c

XOBJECTFILES = \
	dpsXclient.o\
	dpssysnames.o\
	dpsXpriv.o\
	XDPS.o\
	dpsXtdisp.o\
	dpsXcmu.o

XSOURCEFILES = \
	dpsXclient.c\
	dpssysnames.c\
	dpsXpriv.c\
	XDPS.c\
	dpsXtdisp.c\
	dpsXcmu.c

XCSDPSOBJECTFILES = \
	cslibext.o\
	csopendi.o\
	csconndi.o\
	csstartNX.o\
	csfindNX.o\
	cslibint.o

XCSDPSSOURCEFILES = \
	cslibext.c\
	csopendi.c\
	csconndi.c\
	csstartNX.c\
	csfindNX.c\
	cslibint.c

DPSOPSOBJECTS = \
    dpsclrops.o\
    dpsctrlops.o\
    dpsctxtops.o\
    dpsdataops.o\
    dpsfontops.o\
    dpsgsttops.o\
    dpsioops.o\
    dpsmathops.o\
    dpsmtrxops.o\
    dpsmiscops.o\
    dpspntops.o\
    dpspathops.o\
    dpssysops.o\
    dpswinops.o\
    dpsopstack.o\
    dpsXops.o\
    dpsl2ops.o

PSOPSOBJECTS = \
    psclrops.o\
    psctrlops.o\
    psctxtops.o\
    psdataops.o\
    psfontops.o\
    psgsttops.o\
    psioops.o\
    psmathops.o\
    psmtrxops.o\
    psmiscops.o\
    pspntops.o\
    pspathops.o\
    pssysops.o\
    pswinops.o\
    psopstack.o\
    psXops.o\
    psl2ops.o

DPSOPSHEADERFILES = \
    dpsclrops.h\
    dpsctrlops.h\
    dpsctxtops.h\
    dpsdataops.h\
    dpsfontops.h\
    dpsgsttops.h\
    dpsioops.h\
    dpsmathops.h\
    dpsmtrxops.h\
    dpsmiscops.h\
    dpsopstack.h\
    dpspntops.h\
    dpspathops.h\
    dpssysops.h\
    dpswinops.h\
    dpsXops.h\
    dpsl2ops.h

PSOPSHEADERFILES = \
    psclrops.h\
    psctrlops.h\
    psctxtops.h\
    psdataops.h\
    psfontops.h\
    psgsttops.h\
    psioops.h\
    psmathops.h\
    psmtrxops.h\
    psmiscops.h\
    pspntops.h\
    pspathops.h\
    pssysops.h\
    pswinops.h\
    psopstack.h\
    psXops.h\
    psl2ops.h

DPSOPSCFILES = \
    dpsclrops.c\
    dpsctrlops.c\
    dpsctxtops.c\
    dpsdataops.c\
    dpsfontops.c\
    dpsgsttops.c\
    dpsioops.c\
    dpsmathops.c\
    dpsmtrxops.c\
    dpsmiscops.c\
    dpsopstack.c\
    dpspntops.c\
    dpspathops.c\
    dpssysops.c\
    dpswinops.c\
    dpsXops.c\
    dpsl2ops.c

PSOPSCFILES = \
    psclrops.c\
    psctrlops.c\
    psctxtops.c\
    psdataops.c\
    psfontops.c\
    psgsttops.c\
    psioops.c\
    psmathops.c\
    psmtrxops.c\
    psmiscops.c\
    pspntops.c\
    pspathops.c\
    pssysops.c\
    pswinops.c\
    psopstack.c\
    psXops.c\
    psl2ops.c

/*
 * hv: HEADERS must be here, otherwise IncSubdir-triggered BuildIncludes
 * will fail on systems without ln cmd
 */
HEADERS = psops.h dpsops.h

all:: $(HEADERS)

includes:: $(DPSOPSCFILES) $(PSOPSCFILES) $(HEADERS)

$(DPSOPSCFILES) $(PSOPSCFILES): HostProgramTargetName($(PSWRAP))

SRCS = \
	${COMMONSOURCEFILES} \
	${XSOURCEFILES} \
	${XCSDPSSOURCEFILES} \
	${DPSOPSCFILES} \
	${PSOPSCFILES}

OBJS = \
	${COMMONOBJECTFILES} \
	${XOBJECTFILES} \
	${XCSDPSOBJECTFILES} \
	${DPSOPSOBJECTS} \
	${PSOPSOBJECTS}

DERIVED_FILES = $(DPSOPSHEADERFILES) $(PSOPSHEADERFILES) \
		$(DPSOPSCFILES) $(PSOPSCFILES)

#include <Library.tmpl>

.SUFFIXES: .psw .h

.psw.c : HostProgramTargetName($(PSWRAP))
	RunProgram(PSWRAP,-a -o $*.c -h $*.h $<)

.psw.h : HostProgramTargetName($(PSWRAP))
	RunProgram(PSWRAP,-a -h $*.h $< > /dev/null)

HostProgramTargetName($(PSWRAP)):
	@echo "checking $@ over in $(PSWRAPSRC) first..."; \
	test -d $(PSWRAPSRC) && cd $(PSWRAPSRC) && $(MAKE) pswraponly; \
	echo "okay, continuing in $(CURRENT_DIR)"

includes :: $(HEADERS)
depend :: $(DPSOPSCFILES) $(PSOPSCFILES)

psops.h : $(PSOPSHEADERFILES)
	RemoveFile($@)
	${CAT} $(PSOPSHEADERFILES) |\
	    ${SED} -e '/^$$/D' -e '/#/D' -e '/^\//D'\
		-e '/^   gener/D' -e '/^.\//D' |\
	    ${SORT} > .sort
	${AWK} '/;/ {print; printf("\n");}' .sort > .ttt
	${CAT} psname.txt header.txt psifdef.txt .ttt psendif.txt > psops.h
	RemoveFiles(.sort .ttt .attt)

dpsops.h : psops.h $(DPSOPSHEADERFILES)
	RemoveFile($@)
	${CAT} $(DPSOPSHEADERFILES) |\
	    ${SED} -e '/^$$/D' -e '/#/D' -e '/^\//D'\
		-e '/^   gener/D' -e '/^.\//D' |\
	    ${SORT} > .sort
	${AWK} '/;/ {print; printf("\n");}' .sort > .ttt
	${CAT} dpsname.txt header.txt dpsifdef.txt .ttt dpsendif.txt > dpsops.h
	RemoveFiles(.sort .ttt .attt)

clean ::
	${RM} $(DERIVED_FILES) .sort .ttt .att psops.h dpsops.h *%

DependTarget()