/[TIS-4000 Rel T60]/sun2.4/servers/Makefile
ViewVC logotype

Contents of /sun2.4/servers/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations)
Mon Dec 6 17:33:58 1999 UTC (24 years, 2 months ago) by tis4000
Branch: MAIN
CVS Tags: LMC_baseline
Changes since 1.3: +11 -2 lines
Use new version message format, generate buildVersion.h - Bekkerman

1 CC = gcc -I/usr/include -DSOLARIS
2 ALTCC=CC -DSOLARIS -g
3 CFLAGS = -g -DCONTRACTS -DUNIX -DATT -D__EXTENSIONS__ -DUSECB63
4 GCCFLAGS = -c -Wunused $(CFLAGS)
5 STDLIBS = -ldl -lsocket -lnsl
6 RM = rm -f
7
8 TOP = ../../..
9
10 CODEBASEPATH = /tools/codebase63/source
11
12 SHAREPATH = $(TOP)/share
13 SRCPATH = $(SHAREPATH)/src
14 SRC = $(SRCPATH)/servers
15 EPICSHDIR = $(SHAREPATH)/epicsH
16 TRENDVUSRCDIR = $(SRCPATH)/trendvuCC
17 LIBTISSRCDIR = $(SRCPATH)/libtis
18 TRENDSRCDIR = $(SRCPATH)/newtrend
19 AVMSRCDIR = $(SRCPATH)/avm
20
21 INCLUDES = \
22 -I$(SRC) \
23 -I$(CODEBASEPATH) \
24 -I$(EPICSHDIR) \
25 -I$(TRENDSRCDIR) \
26 -I$(LIBTISSRCDIR) \
27 -I. \
28 -I$(AVMSRCDIR)
29
30 ALLDEFINES = $(INCLUDES)
31
32 LIBS = \
33 ../bin/tisMsgLib.a \
34 ../bin/libCom.a \
35 ../bin/libtis.a \
36 ../bin/libUnix.a \
37 $(CODEBASEPATH)/libcb.a \
38 ../bin/libca.a -lm
39
40 SRCS = \
41 $(SRC)/client.c \
42 $(SRC)/mergeupdates.c \
43 $(SRC)/OpPrivData.c \
44 $(SRC)/plcTrendLib.c \
45 $(SRC)/server.c \
46 $(SRC)/snapsync.c \
47 $(SRC)/svcmgr.c \
48 $(SRC)/svcquery.c \
49 $(SRC)/trendupdate.c
50 # $(SRC)/trenddata.c
51
52 all : \
53 depend \
54 buildVersion.h \
55 libServer.a \
56 client.o \
57 OpPrivData \
58 server.o \
59 svcmgr \
60 svcquery
61
62 #-------------------------------------------------------------------------------
63 # Svcquery - respond to broadcast for server site
64
65 svcquery : svcquery.o
66 $(RM) svcquery
67 $(CC) $(CFLAGS) -o svcquery svcquery.o $(STDLIBS) ../bin/tisMsgLib.a
68
69 svcquery.o : $(SRC)/svcquery.c
70 $(RM) svcquery.o
71 $(CC) $(GCCFLAGS) -o svcquery.o $(INCLUDES) $(SRC)/svcquery.c
72
73 #-------------------------------------------------------------------------------
74 # Svcmgr - execute proper server for the client request
75
76 svcmgr : svcmgr.o ../bin/tisMsgLib.a
77 $(RM) svcmgr
78 $(CC) $(CFLAGS) -o svcmgr svcmgr.o $(STDLIBS) ../bin/tisMsgLib.a
79
80 svcmgr.o : $(SRC)/svcmgr.c
81 $(RM) svcmgr.o
82 $(CC) $(GCCFLAGS) -o svcmgr.o $(INCLUDES) $(SRC)/svcmgr.c
83
84 #-------------------------------------------------------------------------------
85 # Snapsync client - requests data from other hosts to fill in ar_snap file
86
87 snapsync : snapsync.o client.o \
88 ../bin/xbaseSnapLib.a ../bin/dbLibrary.a $(LIBS)
89 $(RM) snapsync
90 $(CC) $(CFLAGS) -o snapsync snapsync.o client.o \
91 ../newtrend/trendLib.o ../newtrend/utils.o \
92 ../bin/xbaseSnapLib.a ../bin/dbLibrary.a \
93 $(LIBS) $(STDLIBS)
94
95 snapsync.o : $(SRC)/snapsync.c $(TRENDSRCDIR)/archiveLib.h \
96 $(SRC)/server.h $(SRC)/tisservice.h
97 $(RM) snapsync.o
98 $(CC) $(GCCFLAGS) -o snapsync.o $(INCLUDES) $(SRC)/snapsync.c
99
100 #-------------------------------------------------------------------------------
101 # Trenddata server program components
102
103 trenddata : trenddata.o server.o ../newtrend/trendLib.o ../newtrend/utils.o \
104 ../bin/xbaseSnapLib.a ../bin/dbLibrary.a $(LIBS)
105 $(RM) trenddata
106 $(CC) $(CFLAGS) -o trenddata trenddata.o server.o \
107 ../newtrend/trendLib.o ../newtrend/utils.o \
108 ../bin/xbaseSnapLib.a ../bin/dbLibrary.a $(LIBS) $(STDLIBS)
109
110 trenddata.o : $(SRC)/trenddata.c $(TRENDSRCDIR)/archiveLib.h \
111 $(SRC)/server.h $(SRC)/tisservice.h
112 $(RM) trenddata.o
113 $(CC) $(GCCFLAGS) -o trenddata.o $(INCLUDES) $(SRC)/trenddata.c
114
115 #-------------------------------------------------------------------------------
116 # oracle Snapsync client - requests data from other hosts to fill in ar_snap file
117
118 oracleSnapsync : snapsync.o client.o ../bin/tisMsgLib.a oracleTrendfil.o \
119 ../newtrend/trendLib.o ../newtrend/archiveLib.o \
120 ../newtrend/oracleSnapLib.o ../avm/catLib.o ../newtrend/utils.o \
121 ../bin/tisMsgLib.a
122 $(RM) oracleSnapsync
123 $(CC) $(CFLAGS) -o oracleSnapsync snapsync.o client.o ../bin/tisMsgLib.a \
124 oracleTrendfil.o \
125 ../newtrend/trendLib.o ../newtrend/utils.o \
126 $(LIBS) $(STDLIBS) ../newtrend/archiveLib.o ../newtrend/oracleSnapLib.o \
127 ../avm/catLib.o \
128 $(CODEBASEPATH)/libcb.a ../bin/dbLibrary.a -lUnix -lcb \
129 -L$(ORACLEHOME)/lib -lsql $(ORACLEHOME)/lib/osntab.o -lsqlnet \
130 -lora -lsqlnet -lpls -lora -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 \
131 -lcore3 -lsocket -lnsl -lm -ldl -laio -lsocket
132
133
134 #-------------------------------------------------------------------------------
135 # oracle Trenddata server program components
136
137 oracleTrenddata : trenddata.o server.o oracleTrendfil.o ../newtrend/trendLib.o \
138 ../newtrend/utils.o ../newtrend/archiveLib.o \
139 ../newtrend/oracleSnapLib.o ../avm/catLib.o
140 rm -f oracleTrenddata
141 $(CC) $(CFLAGS) -o oracleTrenddata trenddata.o server.o oracleTrendfil.o \
142 ../newtrend/trendLib.o ../newtrend/utils.o \
143 $(LIBS) $(STDLIBS) ../newtrend/archiveLib.o ../newtrend/oracleSnapLib.o \
144 ../avm/catLib.o \
145 $(TOP)/unix/sun2.4/bin/libcb.a ../bin/dbLibrary.a -lUnix -lcb \
146 -L$(ORACLEHOME)/lib -lsql $(ORACLEHOME)/lib/osntab.o -lsqlnet \
147 -lora -lsqlnet -lpls -lora -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 \
148 -lcore3 -lsocket -lnsl -lm -ldl -laio -lsocket
149
150
151 oracleTrendfil.o : $(TRENDVUSRCDIR)/trendfil.c $(TRENDVUSRCDIR)/trendfil.h
152 $(CC) $(CFLAGS) -DORACLESNAP -c -o oracleTrendfil.o $(INCLUDES) \
153 $(TRENDVUSRCDIR)/trendfil.c
154
155 #-------------------------------------------------------------------------------
156 # Trend update and merge components
157
158 trendupdate : trendupdate.o plcTrendLib.o ../servers/server.o utils.o \
159 $(CODEBASEPATH)/libcb.a ../bin/tisMsgLib.a ../libtis.a
160 $(RM) trendupdate
161 $(CC) -o trendupdate trendupdate.o plcTrendLib.o \
162 ../servers/server.o utils.o \
163 $(CODEBASEPATH)/libcb.a ../bin/tisMsgLib.a ../bin/libtis.a\
164 -lm -lsocket -lnsl
165
166 trendupdate.o : $(SRC)/trendupdate.c
167 $(RM) trendupdate.o
168 $(CC) $(GCCFLAGS) $(INCLUDES) $(SRC)/trendupdate.c
169
170 testtrendupdate: testtrendupdate.o plcTrendLib.o ../servers/server.o utils.o
171 $(CODEBASEPATH)/libcb.a ../bin/tisMsgLib.a ../bin/libtis.a
172 $(RM) testtrendupdate
173 $(CC) -o testtrendupdate testtrendupdate.o plcTrendLib.o \
174 ../servers/server.o utils.o
175 $(CODEBASEPATH)/libcb.a ../bin/tisMsgLib.a ../bin/libtis.a \
176 -lm -lsocket -lnsl
177
178 testtrendupdate.o : $(SRC)/trendupdate.c
179 $(RM) testtrendupdate.o
180 $(CC) $(GCCFLAGS) $(INCLUDES) -DTEST -o testtrendupdate.o $(SRC)/trendupdate.c
181
182 plcTrendLib.o : $(SRC)/plcTrendLib.c
183 $(RM) plcTrendLib.o
184 $(CC) $(GCCFLAGS) $(INCLUDES) $(SRC)/plcTrendLib.c
185
186 mergeupdates: mergeupdates.o utils.o ../servers/client.o \
187 ../bin/tisMsgLib.a $(CODEBASEPATH)/libcb.a ../bin/tisMsgLib.a \
188 ../libtis.a
189 $(CC) -o mergeupdates mergeupdates.o ../servers/client.o utils.o \
190 ../bin/tisMsgLib.a $(CODEBASEPATH)/libcb.a ../bin/tisMsgLib.a \
191 ../bin/libtis.a \
192 -lm -lsocket -lnsl
193
194 mergeupdates.o : $(SRC)/mergeupdates.c
195 $(RM) mergeupdates.o
196 $(CC) $(GCCFLAGS) $(INCLUDES) $(SRC)/mergeupdates.c
197
198 #-------------------------------------------------------------------------------
199 # OpPrivdata server program components
200
201 OpPrivData : OpPrivData.o server.o $(LIBS)
202 $(RM) OpPrivData
203 $(CC) $(CFLAGS) -o OpPrivData OpPrivData.o server.o \
204 $(LIBS) $(STDLIBS)
205
206 OpPrivData.o : $(SRC)/OpPrivData.c $(SRC)/OpPrivData.h \
207 $(LIBTISSRCDIR)/OperPriv.h $(SRC)/server.h \
208 $(SRC)/tisservice.h
209 $(RM) OpPrivData.o
210 $(CC) $(GCCFLAGS) -o OpPrivData.o $(INCLUDES) $(SRC)/OpPrivData.c
211
212 debugOpPrivData : debugOpPrivData.o serverDebug.o $(LIBS)
213 $(RM) debugOpPrivData
214 $(CC) $(CFLAGS) -o debugOpPrivData debugOpPrivData.o serverDebug.o \
215 $(LIBS) $(STDLIBS)
216
217 debugOpPrivData.o : $(SRC)/OpPrivData.c $(SRC)/OpPrivData.h \
218 $(LIBTISSRCDIR)/OperPriv.h $(SRC)/server.h \
219 $(SRC)/tisservice.h
220 $(RM) debugOpPrivData.o
221 $(CC) $(GCCFLAGS) -DDEBUG -o debugOpPrivData.o $(INCLUDES) $(SRC)/OpPrivData.c
222 #-------------------------------------------------------------------------------
223 # libServer.a
224 libServer.a: client.o server.o
225 $(RM) libServer.a
226 ar crv libServer.a client.o server.o
227 cp -p libServer.a ../bin
228 #-------------------------------------------------------------------------------
229 # Common server program components
230
231 ../avm/catLib.o: $(SRCPATH)/avm/catLib.c
232 cd ../avm ; make catLib.o
233
234 client.o : $(SRC)/client.c $(SRC)/client.h $(SRC)/tisservice.h
235 $(RM) client.o
236 $(CC) $(GCCFLAGS) -o client.o $(INCLUDES) $(SRC)/client.c
237
238 clientDebug.o : $(SRC)/client.c $(SRC)/client.h $(SRC)/tisservice.h
239 $(RM) clientDebug.o
240 $(CC) $(GCCFLAGS) -DDEBUG -o clientDebug.o $(INCLUDES) $(SRC)/client.c
241
242 server.o : $(SRC)/server.c $(SRC)/server.h $(SRC)/tisservice.h
243 $(RM) server.o
244 $(CC) $(GCCFLAGS) -o server.o $(INCLUDES) $(SRC)/server.c
245
246 serverDebug.o : $(SRC)/server.c $(SRC)/server.h $(SRC)/tisservice.h
247 $(RM) serverDebug.o
248 $(CC) $(GCCFLAGS) -DDEBUG -o serverDebug.o $(INCLUDES) $(SRC)/server.c
249
250
251 install :
252 cp -p OpPrivData ../bin
253 cp -p libServer.a ../bin
254 cp -p svcquery ../bin
255 cp -p svcmgr ../bin
256
257 clean :
258 $(RM) client.o
259 $(RM) server.o
260 $(RM) serverDebug.o
261 $(RM) utils.o
262 $(RM) svcquery
263 $(RM) svcquery.o
264 $(RM) svcmgr
265 $(RM) svcmgr.o
266 $(RM) snapsync
267 $(RM) snapsync.o
268 $(RM) trenddata
269 $(RM) trenddata.o
270 $(RM) oracleSnapsync
271 $(RM) oracleTrendfil.o
272 $(RM) oracleTrenddata
273 $(RM) trendupdate
274 $(RM) trendupdate.o
275 $(RM) plcTrendLib.o
276 $(RM) testtrendupdate
277 $(RM) testtrendupdate.o
278 $(RM) mergeupdates
279 $(RM) mergeupdates.o
280 $(RM) OpPrivData
281 $(RM) OpPrivData.o
282 $(RM) debugOpPrivData
283 $(RM) debugOpPrivData.o
284 $(RM) libServer.a
285 $(RM) Makefile.depend
286 $(RM) buildVersion.h
287
288 depend: Makefile.depend
289
290 Makefile.depend: buildVersion.h $(SRCS) Makefile
291 $(RM) Makefile.depend
292 $(CC) -M $(ALLDEFINES) $(SRCS) > Makefile.depend
293
294 include Makefile.depend
295
296 buildVersion.h : $(SRCS) Makefile
297 $(RM) buildVersion.h
298 pwd > work0.tmp
299 sed -f ../bin/vrsscript.sed work0.tmp > xxx.txt
300 ../bin/getverdefs.sh xxx.txt > buildVersion.h
301 date '+#define BUILDDATE "%m/%d/%Y"' >> buildVersion.h
302 $(RM) xxx.txt work0.tmp

  ViewVC Help
Powered by ViewVC 1.1.30