File: Imakefile

package info (click to toggle)
lcgdm 1.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,532 kB
  • sloc: ansic: 226,887; sh: 13,562; perl: 11,575; python: 11,572; cpp: 5,716; sql: 1,824; makefile: 1,301; fortran: 113
file content (573 lines) | stat: -rw-r--r-- 21,311 bytes parent folder | download | duplicates (2)
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
COMM
COMM  Copyright (C) 2004-2011 by CERN
COMM  All rights reserved
COMM
COMM  @(#)$RCSfile: Imakefile,v $ $Revision: 9741 $ $Date: 2013-11-27 15:27:33 +0100 (Wed, 27 Nov 2013) $ CERN Jean-Philippe Baud

COMM    Make Disk Pool Manager

#if BuildInterfaces
PYTHON=PythonProgram
PYTHON_VERSION=$(shell $(PYTHON) -c "import sys; print sys.version[:3]")
PYTHON_PREFIX=$(shell $(PYTHON) -c "import os; import sys; print os.path.normpath(sys.prefix)")
INCLUDE_PYTHON=$(shell $(PYTHON) -c "from distutils import sysconfig; print('-I' + sysconfig.get_python_inc(0))")
PYTHON_LIB=$(shell $(PYTHON) -c "from distutils import sysconfig; import sys; print('-L' + sysconfig.get_config_var('LIBDEST') + '/config -lpython' + sys.version[:3] + ' ' + sysconfig.get_config_var('LIBS') + ' ' + sysconfig.get_config_var('SYSLIBS'))")
INCLUDE_PERL=$(shell perl -MConfig -e 'print "-I", $$Config{archlibexp}, "/CORE";')
PERL_LIB=$(shell perl -MConfig -e 'print "-L", $$Config{archlibexp}, "/CORE -lperl ", $$Config{perllibs};')
SWIG_LOCATION = SwigLocation
SWIG = SWIG_LIB=SwigLib $(SWIG_LOCATION)/bin/swig
#endif

DPMCONFIG = DpmConfigFile
DPMSHAREDIR = FileName($(SHAREDIR),lcgdm)
#if BuildSecurity
CSECFLAG = -DCSEC
#if UseGSI
GLOBUS_LOCATION=GlobusLocation
#if EMIBuild
GLOBUS_LIBS=-lglobus_gssapi_gsi -lglobus_gss_assist -lglobus_common
#else
#if defined(__STDC__)
GLOBUS_FLAVOUR=GlobusFlavour##pthr
#else
GLOBUS_FLAVOUR=GlobusFlavour/**/pthr
#endif
GLOBUS_LIBS=-L$(GLOBUS_LOCATION)/lib -lglobus_gssapi_gsi_$(GLOBUS_FLAVOUR) -lglobus_gss_assist_$(GLOBUS_FLAVOUR) -lglobus_common_$(GLOBUS_FLAVOUR)
#endif
LIBCSEC += $(GLOBUS_LIBS)
#endif
LIBCSEC += -ldl
#if UseVirtualIds
VIDFLAG = -DVIRTUAL_ID
#endif
#if UseVOMS
VOMSFLAG = -DUSE_VOMS
#endif
#endif 
INCLUDES = FileName(..,h)
#if SOLARIS
LIBS = -L../shlib -ldpm -llcgdm -lsocket -lnsl
#else
#if _WIN32
LIBS = ..\lib\dpm.lib wsock32.lib advapi32.lib
#else
LIBS = -L../shlib -ldpm -llcgdm
#endif
#endif
LIBUUID =
#ifndef darwin
LIBUUID += -luuid
#endif
BACKEND_LIBS = DepLibraryTargetName(dpmcopy,dpmcopy)
#if BuildDicomCopy
BACKEND_LIBS += DepLibraryTargetName(dicomcopy,dicomcopy)
DICOMFLAG = -DDICOM
#endif
SPOOL = DpmSpool
LOGFILE = FileName($(SPOOL),log)
#if UseOracle
DBOBJS = dpm_oracle_ifce.Osuf
#if BuildDicomCopy
DBOBJS += dicomcopy_oracle_ifce.Osuf
#endif
ORAFLG = -DUSE_ORACLE
ifdef ORACLE_INCLUDE
ORAINC = -I$(ORACLE_INCLUDE)
else
ORAINC = -I$(ORACLE_HOME)/precomp/public
endif
DBCREAT = create_dpm_tables_oracle.sql
#else
#if UseMySQL
DBOBJS = dpm_mysql_ifce.Osuf
#if BuildDicomCopy
DBOBJS += dicomcopy_mysql_ifce.Osuf
#endif
MYSFLG = -DUSE_MYSQL
MYSQL_LOCATION = MySQLLocation
MYSINC = -I$(MYSQL_LOCATION)/include/mysql
LIBMYS = -L$(MYSQL_LOCATION)/$(_lib)/mysql -lmysqlclient
DBCREAT = create_dpm_tables_mysql.sql
#else
#if UsePostgres
DBOBJS = dpm_libpq_ifce.Osuf
#if BuildDicomCopy
DBOBJS += dicomcopy_libpq_ifce.Osuf
#endif
POSFLG = -DUSE_POSTGRES
LIBPOS = -lpq
DBCREAT = create_dpm_tables_postgres.sql
#endif
#endif
#endif
CNS_ROOT_DIR = NsRoot
CNS_ROOT = -DCNS_ROOT=\"$(CNS_ROOT_DIR)\"
STAGERSUPERUSER0 = StagerSuperUser
STAGERSUPERUSER  = -DSTAGERSUPERUSER=\"$(STAGERSUPERUSER0)\"
STAGERSUPERGROUP0 = StagerSuperGroup
STAGERSUPERGROUP = -DSTAGERSUPERGROUP=\"$(STAGERSUPERGROUP0)\"

COMM######################### FLAGS ##############################

DFLAGS = -DDPMCONFIG=\"$(DPMCONFIG)\" \
         -DLOGFILE=\"$(LOGFILE)\" \
	 $(CNS_ROOT) $(STAGERSUPERUSER) $(STAGERSUPERGROUP) \
         $(ORAFLG) $(MYSFLG) $(POSFLG) $(CSECFLAG) $(VIDFLAG) $(VOMSFLAG) $(DICOMFLAG)
 
CFLAGS = -g -I$(INCLUDES) $(MTCCFLAGS) $(DFLAGS) $(ORAINC) $(MYSINC) $(POSINC)

COMM######################### DEPENDENCY LIBRARIES ###############
 
DEPLIB = DepSharedLibraryTargetName(shlib,dpm)

COMM######################### RULES ##############################

#if BuildDPMClient
MANDIRS = $(LIBMANDIR) $(MANDIR)
#else
#if BuildDPMServer
MANDIRS = $(MANDIR) $(DMONMANDIR)
#endif
#endif

#if BuildDPMServer
MANPAGESSERVER = $(LIBFLAVOURDIR)/dpm.$(DMONMANSUFFIX) \
           $(LIBFLAVOURDIR)/dpm-buildfsv.$(DMONMANSUFFIX) \
           $(LIBFLAVOURDIR)/dpm-shutdown.$(DMONMANSUFFIX)
#endif

#if BuildDPMClient
MANPAGESCLIENT = $(MANDIR)/dpm-addfs.$(MANSUFFIX) \
	   $(MANDIR)/dpm-addpool.$(MANSUFFIX) \
	   $(MANDIR)/dpm-drain.$(MANSUFFIX) \
	   $(MANDIR)/dpm-getspacemd.$(MANSUFFIX) \
	   $(MANDIR)/dpm-getspacetokens.$(MANSUFFIX) \
	   $(MANDIR)/dpm-modifyfs.$(MANSUFFIX) \
	   $(MANDIR)/dpm-modifypool.$(MANSUFFIX) \
	   $(MANDIR)/dpm-ping.$(MANSUFFIX) \
	   $(MANDIR)/dpm-qryconf.$(MANSUFFIX) \
	   $(MANDIR)/dpm-register.$(MANSUFFIX) \
	   $(MANDIR)/dpm-releasespace.$(MANSUFFIX) \
	   $(MANDIR)/dpm-replicate.$(MANSUFFIX) \
	   $(MANDIR)/dpm-reservespace.$(MANSUFFIX) \
	   $(MANDIR)/dpm-rmfs.$(MANSUFFIX) \
	   $(MANDIR)/dpm-rmpool.$(MANSUFFIX) \
	   $(MANDIR)/dpm-updatespace.$(MANSUFFIX) \
	   $(LIBMANDIR)/dpm_abortfiles.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_abortreq.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_accessr.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_addfs.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_addpool.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_copy.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_delreplica.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_extendfilelife.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_get.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getifcevers.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getpoolfs.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getpools.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getprotocols.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getreqid.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getreqsummary.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getspacemd.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getspacetoken.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getstatus_copyreq.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getstatus_getreq.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_getstatus_putreq.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_modifyfs.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_modifypool.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_ping.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_put.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_putx.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_putdone.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_releasespace.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_relfiles.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_reservespace.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_rm.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_rmfs.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_rmpool.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_seterrbuf.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm_updatespace.$(LIBMANSUFFIX)
#endif

#if BuildInterfaces
MANPAGESIFCE = $(MANDIR)/dpm-listspaces.$(MANSUFFIX) \
	   $(LIBMANDIR)/dpm_python.$(LIBMANSUFFIX) \
	   $(LIBMANDIR)/dpm2_python.$(LIBMANSUFFIX)
#endif

#if BuildDPMClient
CLIENT = LibraryTargetName(dpm) \
	 ProgramTargetName(dpm-addfs) \
	 ProgramTargetName(dpm-addpool) \
	 ProgramTargetName(dpm-drain) \
	 ProgramTargetName(dpm-getspacemd) \
	 ProgramTargetName(dpm-getspacetokens) \
	 ProgramTargetName(dpm-modifyfs) \
	 ProgramTargetName(dpm-modifypool) \
	 ProgramTargetName(dpm-ping) \
	 ProgramTargetName(dpm-qryconf) \
	 ProgramTargetName(dpm-register) \
	 ProgramTargetName(dpm-releasespace) \
	 ProgramTargetName(dpm-replicate) \
	 ProgramTargetName(dpm-reservespace) \
	 ProgramTargetName(dpm-rmfs) \
	 ProgramTargetName(dpm-rmpool) \
	 ProgramTargetName(dpm-updatespace)
IPROGS_C = FileName($(BIN),ProgramTargetName(dpm-addfs)) \
	   FileName($(BIN),ProgramTargetName(dpm-addpool)) \
	   FileName($(BIN),ProgramTargetName(dpm-drain)) \
	   FileName($(BIN),ProgramTargetName(dpm-getspacemd)) \
	   FileName($(BIN),ProgramTargetName(dpm-getspacetokens)) \
	   FileName($(BIN),ProgramTargetName(dpm-modifyfs)) \
	   FileName($(BIN),ProgramTargetName(dpm-modifypool)) \
	   FileName($(BIN),ProgramTargetName(dpm-ping)) \
	   FileName($(BIN),ProgramTargetName(dpm-qryconf)) \
	   FileName($(BIN),ProgramTargetName(dpm-register)) \
	   FileName($(BIN),ProgramTargetName(dpm-releasespace)) \
	   FileName($(BIN),ProgramTargetName(dpm-replicate)) \
	   FileName($(BIN),ProgramTargetName(dpm-reservespace)) \
	   FileName($(BIN),ProgramTargetName(dpm-rmfs)) \
	   FileName($(BIN),ProgramTargetName(dpm-rmpool)) \
	   FileName($(BIN),ProgramTargetName(dpm-updatespace))
#endif

#if BuildDPMServer
SERVER = ProgramTargetName(dpm) \
	 ProgramTargetName(dpm-buildfsv) \
	 ProgramTargetName(dpm-shutdown) \
	 $(DBCREAT) \
	 DPMCONFIG.templ \
	 rc.dpm \
	 dpm.conf.templ \
	 dpm.logrotate
IPROGS_D = FileName($(LIBFLAVOURDIR),ProgramTargetName(dpm)) \
	   FileName($(LIBFLAVOURDIR),ProgramTargetName(dpm-buildfsv)) \
	   FileName($(LIBFLAVOURDIR),ProgramTargetName(dpm-shutdown)) \
	   FileName($(DPMSHAREDIR),$(DBCREAT)) \
	   FileName($(CONFFLAVOURDIR),dpm.init) \
	   FileName($(LIBFLAVOURDIR),DPMCONFIG.templ) \
	   FileName($(CONFFLAVOURDIR),dpm.conf) \
	   FileName($(CONFFLAVOURDIR),dpm.logrotate)
#endif

#if BuildInterfaces
DPM_IFCE = dpm.so \
           dpm.pm \
           _dpm.so \
           dpm.py \
           _dpm2.so \
           dpm2.py
IDPM_IFCE = $(PERLDIR) \
            $(PYTHONDIR) \
            FileName($(BIN),ProgramTargetName(dpm-listspaces)) \
            FileName($(PERLDIR),dpm.so) \
            FileName($(PERLDIR),dpm.pm) \
            FileName($(PYTHONDIR),_dpm.so) \
            FileName($(PYTHONDIR),dpm.py) \
            FileName($(PYTHONDIR),_dpm2.so) \
            FileName($(PYTHONDIR),dpm2.py)
#endif

DPMLIB_OBJS =	dpm_abortfiles.Osuf \
		dpm_abortreq.Osuf \
		dpm_accessr.Osuf \
		dpm_addfs.Osuf \
		dpm_addpool.Osuf \
		dpm_apiinit.Osuf \
		dpm_auth.Osuf \
		dpm_copy.Osuf \
		dpm_delreplica.Osuf \
		dpm_errmsg.Osuf \
		dpm_extendfilelife.Osuf \
		dpm_freefilestatuses.Osuf \
		dpm_get.Osuf \
		dpm_getifcevers.Osuf \
		dpm_getpoolfs.Osuf \
		dpm_getpools.Osuf \
		dpm_getprotocols.Osuf \
		dpm_getreqid.Osuf \
		dpm_getreqsummary.Osuf \
		dpm_getspacemd.Osuf \
		dpm_getspacetoken.Osuf \
		dpm_getstatus_copyreq.Osuf \
		dpm_getstatus_getreq.Osuf \
		dpm_getstatus_putreq.Osuf \
		dpm_getturl.Osuf \
		dpm_inc_reqctr.Osuf \
		dpm_modifyfs.Osuf \
		dpm_modifypool.Osuf \
		dpm_ping.Osuf \
		dpm_put.Osuf \
		dpm_putdone.Osuf \
		dpm_register.Osuf \
		dpm_releasespace.Osuf \
		dpm_relfiles.Osuf \
		dpm_reservespace.Osuf \
		dpm_rm.Osuf \
		dpm_rmfs.Osuf \
		dpm_rmpool.Osuf \
		dpm_updatefilestatus.Osuf \
		dpm_updatespace.Osuf \
		send2dpm.Osuf
SRV_OBJS =	dpm_main.Osuf \
		dpm_buildfsv.Osuf\
		$(DBOBJS) \
		dpm_procreq.Osuf \
		dpm_proclreq.Osuf \
		dpm_procsubr.Osuf \
		dpm_util.Osuf \
		dpmlogit.Osuf \
		poolmgr.Osuf \
		sendrep.Osuf

all: $(CLIENT) $(SERVER) $(DPM_IFCE)

dicomcopy_libpq_ifce.c: DepSourceName(dicomcopy,dicomcopy_libpq_ifce.c)
	RemoveFile(dicomcopy_libpq_ifce.c)
	$(CP) DepSourceName(dicomcopy,dicomcopy_libpq_ifce.c) dicomcopy_libpq_ifce.c
dicomcopy_mysql_ifce.c: DepSourceName(dicomcopy,dicomcopy_mysql_ifce.c)
	RemoveFile(dicomcopy_mysql_ifce.c)
	$(CP) DepSourceName(dicomcopy,dicomcopy_mysql_ifce.c) dicomcopy_mysql_ifce.c
dicomcopy_oracle_ifce.pc: DepSourceName(dicomcopy,dicomcopy_oracle_ifce.pc)
	RemoveFile(dicomcopy_oracle_ifce.pc)
	$(CP) DepSourceName(dicomcopy,dicomcopy_oracle_ifce.pc) dicomcopy_oracle_ifce.pc

#undef YES
dpm_oracle_ifce.c: dpm_oracle_ifce.pc
	proc INAME=dpm_oracle_ifce DEFINE=_THREAD_SAFE INCLUDE=$(INCLUDES) THREADS=YES CHAR_MAP=STRING PARSE=FULL $(WNT_SYS_INCLUDE)
dicomcopy_oracle_ifce.c: dicomcopy_oracle_ifce.pc
	proc INAME=dicomcopy_oracle_ifce DEFINE=_THREAD_SAFE INCLUDE=$(INCLUDES) THREADS=YES CHAR_MAP=STRING PARSE=FULL $(WNT_SYS_INCLUDE)
#define YES 1

NormalProgramTarget(dpm-addfs,dpm-addfs.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-addpool,dpm-addpool.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-drain,dpm-drain.Osuf dpm_replicate.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-getspacemd,dpm-getspacemd.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-getspacetokens,dpm-getspacetokens.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-modifyfs,dpm-modifyfs.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-modifypool,dpm-modifypool.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-ping,dpm-ping.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-qryconf,dpm-qryconf.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-register,dpm-register.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-releasespace,dpm-releasespace.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-replicate,dpm-replicate.Osuf dpm_replicate.Osuf,$(DEPLIB), $(LIBS))
NormalProgramTarget(dpm-reservespace,dpm-reservespace.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-rmfs,dpm-rmfs.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-rmpool,dpm-rmpool.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-updatespace,dpm-updatespace.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-buildfsv,dpm-buildfsv.Osuf dpm_buildfsv.Osuf,$(DEPLIB),$(LIBS))
NormalProgramTarget(dpm-shutdown,dpm-shutdown.Osuf,$(DEPLIB),$(LIBS))

#if UseOracle && !defined(_WIN32)
dpm: $(SRV_OBJS) $(DEPLIB) $(BACKEND_LIBS)
	$(MAKE) -f oralink.mk dpm SRV_OBJS="$(SRV_OBJS)" CLDFLAGS=$(MTLDFLAGS) LIBS="$(SECLIB) $(BACKEND_LIBS) $(LIBS) $(MTLDLIBS) $(LIBUUID)"
#else
NormalProgramTarget(dpm,$(SRV_OBJS), $(DEPLIB) $(BACKEND_LIBS), $(MTLDFLAGS) $(SECLIB) $(BACKEND_LIBS) $(LIBS) $(MTLDLIBS) $(LIBORA) $(LIBMYS) $(LIBPOS) $(LIBUUID))
#endif
#if UseOracle
DPMCONFIG.templ: DPMCONFIG.oracle
	$(CP) $? $@
rc.dpm: dpm.scripts.oracle
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE=$(DPMCONFIG)#' \
		-e 's#PREFIX=.*#PREFIX=$(prefix)#' $? > $@
dpm.conf.templ: dpm.sysconfig.oracle
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE="$(DPMCONFIG)"#' $? > $@
create_dpm_tables_oracle.sql: dpm_oracle_tbl.sql
	$(CP) $? $@
#else
#if UseMySQL
DPMCONFIG.templ: DPMCONFIG.mysql
	$(CP) $? $@
rc.dpm: dpm.scripts.mysql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE=$(DPMCONFIG)#' \
		-e 's#PREFIX=.*#PREFIX=$(prefix)#' $? > $@
dpm.conf.templ: dpm.sysconfig.mysql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE="$(DPMCONFIG)"#' $? > $@
create_dpm_tables_mysql.sql: dpm_mysql_tbl.sql
	$(CP) $? $@
#else
#if UsePostgres
DPMCONFIG.templ: DPMCONFIG.postgresql
	$(CP) $? $@
rc.dpm: dpm.scripts.postgresql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE=$(DPMCONFIG)#' \
		-e 's#PREFIX=.*#PREFIX=$(prefix)#' $? > $@
dpm.conf.templ: dpm.sysconfig.postgresql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE="$(DPMCONFIG)"#' $? > $@
create_dpm_tables_postgres.sql: dpm_postgresql_tbl.sql
	$(CP) $? $@
#endif
#endif
#endif

NormalLibraryTarget(dpm,$(DPMLIB_OBJS))

#if BuildDPMServer
install: $(BIN) $(SBIN) $(DPMSHAREDIR) $(SYSCONFDIR) $(LOGROTATEDIR) $(INITRCDIR) $(CONFFLAVOURDIR) $(LIBFLAVOURDIR) $(IPROGS_C) $(IPROGS_D) $(SPOOL) $(IDPM_IFCE)
#else
install: $(BIN) $(IPROGS_C) $(IDPM_IFCE)
#endif

InstallProgram(dpm-addfs,$(BIN),root,bin,755)
InstallProgram(dpm-addpool,$(BIN),root,bin,755)
InstallProgram(dpm-drain,$(BIN),root,bin,755)
InstallProgram(dpm-getspacemd,$(BIN),root,bin,755)
InstallProgram(dpm-getspacetokens,$(BIN),root,bin,755)
InstallProgram(dpm-modifyfs,$(BIN),root,bin,755)
InstallProgram(dpm-modifypool,$(BIN),root,bin,755)
InstallProgram(dpm-ping,$(BIN),root,bin,755)
InstallProgram(dpm-qryconf,$(BIN),root,bin,755)
InstallProgram(dpm-register,$(BIN),root,bin,755)
InstallProgram(dpm-releasespace,$(BIN),root,bin,755)
InstallProgram(dpm-replicate,$(BIN),root,bin,755)
InstallProgram(dpm-reservespace,$(BIN),root,bin,755)
InstallProgram(dpm-rmfs,$(BIN),root,bin,755)
InstallProgram(dpm-rmpool,$(BIN),root,bin,755)
InstallProgram(dpm-updatespace,$(BIN),root,bin,755)
InstallProgram(dpm-buildfsv,$(LIBFLAVOURDIR),root,bin,755)
InstallProgram(dpm-shutdown,$(LIBFLAVOURDIR),root,bin,755)
InstallProgram(dpm,$(LIBFLAVOURDIR),root,bin,755)
InstallTarget(DPMCONFIG.templ,root,bin,0644,$(LIBFLAVOURDIR))
InstallTargetRename(rc.dpm,root,bin,0755,$(CONFFLAVOURDIR),dpm.init)
InstallTargetRename(dpm.conf.templ,root,bin,0644,$(CONFFLAVOURDIR),dpm.conf)
InstallTarget(dpm.logrotate,root,bin,0644,$(CONFFLAVOURDIR))
#if BuildDPMServer
InstallTarget($(DBCREAT),root,bin,0644,$(DPMSHAREDIR))
#endif

COMM# -D_GNU_SOURCE is required by Perl using glibc (LGPL v2.1)
dpm.pm : dpm.so
dpm.so : dpm.i ../h/dpm_api.h ../h/dpns_api.h ../h/Cns_api.h
	RemoveFiles(dpm_perlwrap.o dpm_perlwrap.c)
	$(SWIG) -perl -I$(INCLUDES) -DNSTYPE_DPNS -o dpm_perlwrap.c dpm.i
	$(CC) -c $(MTCCFLAGS) -I$(INCLUDES) $(INCLUDE_PERL) -Dbool=char -D_GNU_SOURCE -DNSTYPE_DPNS dpm_perlwrap.c
	$(LD) $(SHLIBLDFLAGS) -o dpm.so dpm_perlwrap.o $(PERL_LIB) $(LIBS)

dpm.py : _dpm.so
_dpm.so : dpm.i ../h/dpm_api.h ../h/dpns_api.h ../h/Cns_api.h
	RemoveFiles(dpm_wrap.o dpm_wrap.c)
	$(SWIG) -python -I$(INCLUDES) -DNSTYPE_DPNS dpm.i
	$(CC) -c $(MTCCFLAGS) -I$(INCLUDES) $(INCLUDE_PYTHON) -DNSTYPE_DPNS dpm_wrap.c
	$(LD) $(SHLIBLDFLAGS) -o _dpm.so dpm_wrap.o $(PYTHON_LIB) $(LIBS)

dpm2.py : _dpm2.so
_dpm2.so : dpm2.i ../h/dpm_api.h ../h/dpns_api.h ../h/Cns_api.h
	RemoveFiles(dpm2_wrap.o dpm2_wrap.c)
	$(SWIG) -python -I$(INCLUDES) -I../ns -DNSTYPE_DPNS dpm2.i
	$(CC) -c $(MTCCFLAGS) -I$(INCLUDES) $(INCLUDE_PYTHON) -DNSTYPE_DPNS dpm2_wrap.c
	$(LD) $(SHLIBLDFLAGS) -o _dpm2.so dpm2_wrap.o $(PYTHON_LIB) $(LIBS)

InstallTarget(dpm.so,root,root,0755,$(PERLDIR))
InstallTarget(dpm.pm,root,root,0644,$(PERLDIR))
InstallTarget(_dpm.so,root,root,0755,$(PYTHONDIR))
InstallTarget(dpm.py,root,root,0644,$(PYTHONDIR))
InstallTarget(_dpm2.so,root,root,0755,$(PYTHONDIR))
InstallTarget(dpm2.py,root,root,0644,$(PYTHONDIR))
InstallProgram(dpm-listspaces,$(BIN),root,bin,755)

MakeDir($(BIN),root,bin,0755)
MakeDir($(SBIN),root,bin,0755)
MakeDir($(DPMSHAREDIR),root,bin,0755)
MakeDir($(SPOOL),root,bin,0755)
MakeDir($(SYSCONFDIR),root,bin,0755)
MakeDir($(INITRCDIR),root,bin,0755)
MakeDir($(LOGROTATEDIR),root,bin,0755)
MakeDir($(CONFFLAVOURDIR),root,bin,0755)
MakeDir($(LIBFLAVOURDIR),root,bin,0755)

MakeDir($(LIBMANDIR),root,bin,0755)
MakeDir($(MANDIR),root,bin,0755)
MakeDir($(DMONMANDIR),root,bin,0755)

#if BuildInterfaces
MakeDir($(PERLDIR),root,root,0755)
MakeDir($(PYTHONDIR),root,root,0755)
#endif

install.man: $(MANDIRS) $(MANPAGESCLIENT) $(MANPAGESSERVER) $(MANPAGESIFCE)

IMANPAGE(dpm,$(LIBFLAVOURDIR),$(DMONMANSUFFIX))
IMANPAGE(dpm-buildfsv,$(LIBFLAVOURDIR),$(DMONMANSUFFIX))
IMANPAGE(dpm-shutdown,$(LIBFLAVOURDIR),$(DMONMANSUFFIX))

IMANPAGE(dpm-addfs,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-addpool,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-drain,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-getspacemd,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-getspacetokens,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-modifyfs,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-modifypool,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-ping,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-qryconf,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-register,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-releasespace,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-replicate,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-reservespace,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-rmfs,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-rmpool,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm-updatespace,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm_abortfiles,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_abortreq,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_accessr,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_addfs,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_addpool,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_copy,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_delreplica,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_extendfilelife,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_get,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getifcevers,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getpoolfs,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getpools,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getprotocols,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getreqid,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getreqsummary,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getspacemd,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getspacetoken,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getstatus_copyreq,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getstatus_getreq,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_getstatus_putreq,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_modifyfs,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_modifypool,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_ping,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_put,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_putx,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_putdone,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_releasespace,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_relfiles,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_reservespace,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_rm,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_rmfs,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_rmpool,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_seterrbuf,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm_updatespace,$(LIBMANDIR),$(LIBMANSUFFIX))

IMANPAGE(dpm-listspaces,$(MANDIR),$(MANSUFFIX))
IMANPAGE(dpm_python,$(LIBMANDIR),$(LIBMANSUFFIX))
IMANPAGE(dpm2_python,$(LIBMANDIR),$(LIBMANSUFFIX))

COMM###################### CLEANING RULES ########################

clean:
	-@RemoveFiles(FilesToClean)

clobber: clean
	-@RemoveFiles($(CLIENT) $(SERVER) $(DPM_IFCE))

#if _WIN32
depend:
	@echo Not supported on this platform
#else
depend:
	makedepend $(DFLAGS) -Y$(INCLUDES) *.c 2> /dev/null
#endif

Makefiles:

MakeDepLibrary(dicomcopy,dicomcopy)
MakeDepLibrary(dpmcopy,dpmcopy)
	
FORCE:

COMM###################### DEPENDENCIES ##########################

COMM DO NOT DELETE THIS LINE -- make  depend  depends  on  it.