blob: e0de46a58f70f9daa24bc562aa4f194f5e0113f4 (
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
|
/**/# Kerberos version 5 Build Parameters
/**/#
/**/# $Source$
/**/# $Author$
/**/# $Id$
#define ProjectKRB 5
#ifndef TouchCmd
#define TouchCmd touch
#endif
#ifndef PerlCmd
#define PerlCmd perl
#endif
#ifndef UnifdefCmd
#define UnifdefCmd $(UNIFDEFSRC)/unifdef
#endif
#ifndef CompileEtCmd
#define CompileEtCmd $(ETSRC)/compile_et
#endif
#ifndef MkCmdsCmd
#define MkCmdsCmd $(SSSRC)/mk_cmds
#endif
#ifndef SSLib
#define SSLib $(SSSRC)/libss.a
#endif
#ifndef ComErrLib
#define ComErrLib $(ETSRC)/libcom_err.a
#endif
#ifndef PosyFlags
#define PosyFlags -f -h2 -a -s
#endif
#ifndef PepyFlags
#define PepyFlags -a PY_advise -s -r
#endif
#ifndef PepyCmd
#define PepyCmd pepy
#endif
#ifndef PosyCmd
#define PosyCmd posy
#endif
#ifndef ArAddCmd
#define ArAddCmd ar cruv
#endif
#ifndef SSTopIncludes
#ifdef UseSSInstalled
#define SSTopIncludes /**/
#else /* not installed SS */
#define SSTopIncludes -I$(TOP)
#endif /* UseSSInstalled */
#endif /* SSTopIncludes */
#ifndef DesDefines
#define DesDefines YouMustFigureOutYourDesDefines
#endif
#ifndef PepyPosyRules
#define PepyPosyRules() @@\
.SUFFIXES: .py @@\
.py.c: @@\
$(PEPY) $(PYFLAGS) $<
#endif /* PepyPosyRules */
#ifndef ErrorTableObjectRule
#define ErrorTableObjectRule() @@\
.SUFFIXES: .et .h .c @@\
@@\
.et.h: @@\
$(COMPILE_ET) $*.et @@\
@@\
.et.c: @@\
$(COMPILE_ET) $*.et
#endif
#ifndef CmdTableObjectRule
#define CmdTableObjectRule() @@\
.SUFFIXES: .ct @@\
@@\
.ct.c: @@\
$(MK_CMDS) $*.ct
#endif
/*
* AdditiveLibraryTarget - generate rules to create a library from
* several directories
*/
#ifndef AdditiveLibraryTarget
#define AdditiveLibraryTarget(libname,objlist) @@\
AllTarget(lib/**/libname.a) @@\
AllTarget(foo/**/libname) @@\
@@\
foo/**/libname: objlist @@\
$(ARADD) lib/**/libname.a objlist @@\
$(TOUCH) foo/**/libname @@\
$(RANLIB) lib/**/libname.a @@\
lib/**/libname.a: objlist @@\
$(ARADD) $@ objlist @@\
$(RANLIB) $@
#endif /* AdditiveLibraryTarget */
/*
* OtherdirLibraryTarget - generate rules to create a library in another
* directory from object files here
*/
#ifndef OtherdirLibraryTarget
#define OtherdirLibraryTarget(libdir,libname,objlist) @@\
AllTarget(objlist) @@\
AllTarget(libdir/lib/**/libname.a) @@\
AllTarget(foo/**/libname) @@\
@@\
foo/**/libname: objlist @@\
$(ARADD) libdir/lib/**/libname.a objlist @@\
$(TOUCH) foo/**/libname @@\
libdir/lib/**/libname.a: @@\
$(ARADD) $@ objlist @@\
$(TOUCH) foo/**/libname
/* The $(RANLIB) is done at the end by the directory itself */
#endif /* OtherdirLibraryTarget */
/*
* CopyHeader - generate rule to copy a generated header file to an include
* tree.
*/
#ifndef CopyHeaderNewName
#define CopyHeaderNewName(hfile,hdir,newname) @@\
includes:: hfile @@\
-if cmp hfile hdir/newname >/dev/null 2>&1; then \ @@\
echo ; \ @@\
else \ @@\
$(RM) hdir/newname ; \ @@\
$(CP) hfile hdir/newname; \ @@\
fi
#endif /* CopyHeaderNewName */
#ifndef CopyHeader
#define CopyHeader(hfile,hdir) CopyHeaderNewName(hfile,hdir,hfile)
#endif /* CopyHeader */
/* Run a header through a preprocessor to generate an architecture/environment
specific header file. note that unifdef's exit status will normally be 1,
indicating some adjustment of the file took place. */
#ifndef ProcessStockHeader
#define ProcessStockHeader(stockname,newname) @@\
newname: stockname Makefile @@\
-$(RM) newname @@\
-$(UNIFDEF) $(PROCESS_DEFINES) stockname >newname
#endif /* ProcessStockHeader */
#if HasPosixTermios
P_TERMIOS=-DHasPosixTermiosTrue
#else
P_TERMIOS=-UHasPosixTermiosTrue
#endif
#if HasPosixFileLocks
P_FLOCKS=-DHasPosixFileLocksTrue
#else
P_FLOCKS=-UHasPosixFileLocksTrue
#endif
#if HasPosixTypes
P_TYPES=-DHasPosixTypesTrue
#else
P_TYPES=-UHasPosixTypesTrue
#endif
#if HasVoidSignalReturn
P_SIGTYPE=-DHasVoidSignalReturnTrue
#else
P_SIGTYPE=-UHasVoidSignalReturnTrue
#endif
#if HasStringH
P_STRINGH=-DHasStringHTrue
#else
P_STRINGH=-UHasStringHTrue
#endif
#ifdef Bitsize16
P_BITSIZE=-DBitsize16 -UBitsize32 -UBitsize64
#endif
#ifdef Bitsize32
P_BITSIZE=-DBitsize32 -UBitsize16 -UBitsize64
#endif
#ifdef Bitsize64
P_BITSIZE=-DBitsize64 -UBitsize16 -UBitsize32
#endif
#if HasNdbm
P_DBM=-DHasNdbmTrue
#else
P_DBM=-UHasNdbmTrue
#endif
#if HasInet
P_INET=-DHasInetTrue
#else
P_INET=-UHasInetTrue
#endif
#if HasStdlibH
P_STDLIBH=-DHasStdlibHTrue
#else
P_STDLIBH=-UHasStdlibHTrue
#endif
/* Override system defaults for <time.h> vs <sys/time.h> */
#if !defined(UseTimeH) && !defined(UseSysTimeH)
#ifdef OS_BSD
#define UseSysTimeH
#else
#define UseTimeH
#endif
#endif
#ifdef UseTimeH
#ifdef UseSysTimeH
P_TIME_DEFS=-DUseTimeH -DUseSysTimeH
#else
P_TIME_DEFS=-DUseTimeH -UUseSysTimeH
#endif
#else
P_TIME_DEFS=-DUseSysTimeH -UUseTimeH
#endif
/*
* Default Definitions.
*/
ARADD = ArAddCmd
TOP_INCLUDES = -I$(TOP)/include $(STDC_TOP_INCLUDES) $(SS_TOP_INCLUDES)
SS_TOP_INCLUDES = SSTopIncludes
CONFIGSRC = $(TOP)/config
ISODE = IsodeDir
IMAKESRC = $(CONFIGSRC)
POFLAGS = PosyFlags
PYFLAGS = PepyFlags
PEPY = PepyCmd
POSY = PosyCmd
TOUCH = TouchCmd
PERL = PerlCmd
PROCESS_DEFINES = $(P_TERMIOS) $(P_FLOCKS) $(P_TYPES) $(P_SIGTYPE) $(P_STRINGH) $(P_BITSIZE) $(P_DBM) $(P_INET) $(P_STDLIBH) $(P_TIME_DEFS) -DUnifdefRan
DESDEFINES = DesDefines
ETSRC = $(TOP)/comerr
SSSRC = $(TOP)/ss
UNIFDEFSRC = $(TOP)/util/unifdef
OSLIB = $(TOP)/lib/os/libos.a
DESLIB = $(TOP)/lib/des/libdes.a
KRB5LIB = $(TOP)/lib/libkrb5.a
CRCLIB = $(TOP)/lib/crc-32/libcrc32.a
ISODELIB = IsodeLib
DBMLIB = DbmLib
DEPKLIB = $(KRB5LIB) $(DESLIB) $(OSLIB) $(CRCLIB)
KLIB = $(DEPKLIB) $(ISODELIB) $(COMERRLIB) $(DBMLIB)
DEPKDBLIB = $(TOP)/lib/kdb/libkdb.a
KDBLIB = $(DEPKDBLIB)
#ifdef UseImakeInstalled
IMAKE = imake /* assume BINDIR in path */
#else
IMAKE = $(IMAKESRC)/imake
#endif
#ifdef UseMakedependInstalled
DEPEND = makedepend /* assume BINDIR in path */
#else
DEPEND = DependCmd
#endif
#ifdef UseSSInstalled
SSLIB = -lss
MK_CMDS = mk_cmds
#else
SSLIB = SSLib
MK_CMDS = MkCmdsCmd
#endif
#ifdef UseComErrInstalled
COMERRLIB = -lcom_err
COMPILE_ET = compile_et
#else
COMERRLIB = ComErrLib
COMPILE_ET = CompileEtCmd
#endif
#ifdef UseUnifdefInstalled
UNIFDEF = unifdef
#else
UNIFDEF = UnifdefCmd
#endif
|