summaryrefslogtreecommitdiffstats
path: root/src/config/Project.tmpl
blob: 909d84e469833cf0f2d5c5624d7ad084d93eee3d (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
/**/# Kerberos version 5 Build Parameters
/**/#
/**/# $Source$
/**/# $Author$
/**/# $Id$

#define ProjectKRB		5

#ifndef TouchCmd
#define TouchCmd touch
#endif
#ifndef PerlCmd
#define PerlCmd perl
#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 DesDefines
#define DesDefines YouMustFigureOutYourDesDefines
#endif

#ifndef PepyPosyRules
#define	PepyPosyRules()							@@\
.SUFFIXES:	.py							@@\
.py.c:									@@\
	$(PEPY) $(PYFLAGS) $<
#endif /* PepyPosyRules */

#ifndef ErrorTableObjectRule

#define ErrorTableObjectRule()						@@\
.SUFFIXES: .et								@@\
									@@\
.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 */

/*
 * Default Definitions.
 */

            ARADD = ArAddCmd
     TOP_INCLUDES = -I$(TOP)/include $(STDC_TOP_INCLUDES)
        CONFIGSRC = $(TOP)/config
            ISODE = IsodeDir
         IMAKESRC = $(CONFIGSRC)
          POFLAGS = PosyFlags
          PYFLAGS = PepyFlags
             PEPY = PepyCmd
             POSY = PosyCmd
            TOUCH = TouchCmd
             PERL = PerlCmd
       DESDEFINES = DesDefines
            ETSRC = $(TOP)/comerr
            SSSRC = $(TOP)/ss
            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