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 (209 lines) | stat: -rw-r--r-- 6,552 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
COMM
COMM  Copyright (C) 2007-2010 by CERN
COMM  All rights reserved
COMM
COMM  @(#)$RCSfile: Imakefile,v $ $Revision: 9297 $ $Date: 2013-08-08 18:03:24 +0200 (Thu, 08 Aug 2013) $ CERN Jean-Philippe Baud

COMM    Make dicomcopy server

DPMSHAREDIR = FileName($(SHAREDIR),lcgdm)
#if BuildSecurity
CSECFLAG = -DCSEC
#if UseGSI
GLOBUS_LOCATION=GlobusLocation
#if EMIBuild
GLOBUS_LIBS=-lglobus_gssapi_gsi -lglobus_gss_assist
#else
GLOBUS_FLAVOUR=GlobusFlavour
GLOBUS_LIBS=-L$(GLOBUS_LOCATION)/lib -lglobus_gssapi_gsi_$(GLOBUS_FLAVOUR) -lglobus_gss_assist_$(GLOBUS_FLAVOUR)
#endif
LIBCSEC += $(GLOBUS_LIBS)
#endif
#if UseVirtualIds
VIDFLAG = -DVIRTUAL_ID
#endif
#if UseVOMS
VOMSFLAG = -DUSE_VOMS
#endif
#endif
DPMCONFIG = DpmConfigFile
INCLUDES = FileName(..,h)
#if SOLARIS
LIBS = -L../shlib -ldpm -llcgdm -lsocket -lnsl -ldl
#else
LIBS = -L../shlib -ldpm -llcgdm -ldl
#endif
SPOOL = DicomcopySpool
LOGFILE = FileName($(SPOOL),log)
#if UseOracle
DBOBJS = dpm_oracle_ifce.Osuf dicomcopy_oracle_ifce.Osuf
ORAFLG = -DUSE_ORACLE
ifdef ORACLE_INCLUDE
ORAINC = -I$(ORACLE_INCLUDE)
else
ORAINC = -I$(ORACLE_HOME)/precomp/public
endif
DBCREAT = create_dicomcopy_tables_oracle.sql
#else
#if UseMySQL
DBOBJS = dpm_mysql_ifce.Osuf dicomcopy_mysql_ifce.Osuf
MYSFLG = -DUSE_MYSQL
MYSQL_LOCATION = MySQLLocation
MYSINC = -I$(MYSQL_LOCATION)/include/mysql
LIBMYS = -L$(MYSQL_LOCATION)/$(_lib)/mysql -lmysqlclient
DBCREAT = create_dicomcopy_tables_mysql.sql
#else
#if UsePostgres
DBOBJS = dpm_libpq_ifce.Osuf dicomcopy_libpq_ifce.Osuf
POSFLG = -DUSE_POSTGRES
LIBPOS = -lpq
DBCREAT = create_dicomcopy_tables_postgres.sql
#endif
#endif
#endif

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

DFLAGS = -DDPMCONFIG=\"$(DPMCONFIG)\" \
         -DLOGFILE=\"$(LOGFILE)\" \
	 $(ORAFLG) $(MYSFLG) $(POSFLG) $(CSECFLAG) $(VIDFLAG) $(VOMSFLAG)

CFLAGS = -g -I$(INCLUDES) $(DFLAGS) $(ORAINC) $(MYSINC) $(POSINC)

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

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

MANPAGES = $(DMONMANDIR)/dicomcopyd.$(DMONMANSUFFIX)

SERVER = ProgramTargetName(dicomcopyd) \
	 $(DBCREAT) \
	 rc.dicomcopyd \
	 dicomcopyd.conf.templ \
	 dicomcopyd.logrotate
PLUGGIN = SharedLibraryTargetName(dpm_dicom)
IPROGS_D = FileName($(SBIN),ProgramTargetName(dicomcopyd)) \
	   FileName($(DPMSHAREDIR),$(DBCREAT)) \
	   FileName($(INITRCDIR),dicomcopyd) \
	   FileName($(SYSCONFDIR),dicomcopyd) \
	   FileName($(LOGROTATEDIR),dicomcopyd)

SRV_OBJS =	dicomcopy_serv.Osuf \
		$(DBOBJS) \
		../dpm/dpmlogit.Osuf \
		../dpm/dpm_util.Osuf \
		../dpm/sendrep.Osuf

all: $(SERVER) $(PLUGGIN)

dpm_libpq_ifce.c: DepSourceName(dpm,dpm_libpq_ifce.c)
	RemoveFile(dpm_libpq_ifce.c)
	$(CP) DepSourceName(dpm,dpm_libpq_ifce.c) dpm_libpq_ifce.c
dpm_mysql_ifce.c: DepSourceName(dpm,dpm_mysql_ifce.c)
	RemoveFile(dpm_mysql_ifce.c)
	$(CP) DepSourceName(dpm,dpm_mysql_ifce.c) dpm_mysql_ifce.c
dpm_oracle_ifce.pc: DepSourceName(dpm,dpm_oracle_ifce.pc)
	RemoveFile(dpm_oracle_ifce.pc)
	$(CP) DepSourceName(dpm,dpm_oracle_ifce.pc) dpm_oracle_ifce.pc

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

dicomcopy_inc_reqctr.Osuf: dicomcopy_inc_reqctr.c
	$(CC) -c -g -I$(INCLUDES) $(MTCCFLAGS) $(CSECFLAG) dicomcopy_inc_reqctr.c
send2dicomcopyd.Osuf: send2dicomcopyd.c
	$(CC) -c -g -I$(INCLUDES) $(MTCCFLAGS) $(CSECFLAG) send2dicomcopyd.c

#if UseOracle && !defined(_WIN32)
dicomcopyd: $(SRV_OBJS) $(DEPLIB)
	$(MAKE) -f oralink.mk dicomcopyd SRV_OBJS="$(SRV_OBJS)" LIBS="$(SECLIB) $(LIBS)"
#else
NormalProgramTarget(dicomcopyd,$(SRV_OBJS), $(DEPLIB), $(SECLIB) $(LIBS) $(LIBORA) $(LIBMYS) $(LIBPOS))
#endif
#if UseOracle
rc.dicomcopyd: dicomcopyd.scripts.oracle
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE=$(DPMCONFIG)#' \
		-e 's#PREFIX=.*#PREFIX=$(prefix)#' $? > $@
dicomcopyd.conf.templ: dicomcopyd.sysconfig.oracle
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE="$(DPMCONFIG)"#' $? > $@
create_dicomcopy_tables_oracle.sql: dicomcopy_oracle_tbl.sql
	$(CP) $? $@
#else
#if UseMySQL
rc.dicomcopyd: dicomcopyd.scripts.mysql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE=$(DPMCONFIG)#' \
		-e 's#PREFIX=.*#PREFIX=$(prefix)#' $? > $@
dicomcopyd.conf.templ: dicomcopyd.sysconfig.mysql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE="$(DPMCONFIG)"#' $? > $@
create_dicomcopy_tables_mysql.sql: dicomcopy_mysql_tbl.sql
	$(CP) $? $@
#else
#if UsePostgres
rc.dicomcopyd: dicomcopyd.scripts.postgresql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE=$(DPMCONFIG)#' \
		-e 's#PREFIX=.*#PREFIX=$(prefix)#' $? > $@
dicomcopyd.conf.templ: dicomcopyd.sysconfig.postgresql
	sed -e 's#DPMCONFIGFILE=.*#DPMCONFIGFILE="$(DPMCONFIG)"#' $? > $@
create_dicomcopy_tables_postgres.sql: dicomcopy_postgresql_tbl.sql
	$(CP) $? $@
#endif
#endif
#endif

NormalLibraryTarget(dicomcopy,dicomcopy_inc_reqctr.Osuf send2dicomcopyd.Osuf)

SharedLibraryTargetName(dpm_dicom): dpm_dicomcopyfile.Osuf
	$(LD) $(SHLIBLDFLAGS) -o $@ dpm_dicomcopyfile.Osuf -L../shlib -llcgdm

install: $(BIN) $(SBIN) $(DPMSHAREDIR) $(SYSCONFDIR) $(LOGROTATEDIR) $(INITRCDIR) $(IPROGS_D) $(SPOOL)

InstallProgram(dicomcopyd,$(SBIN),root,bin,755)
InstallTargetRename(rc.dicomcopyd,root,bin,0644,$(INITRCDIR),dicomcopyd)
InstallTargetRename(dicomcopyd.conf.templ,root,bin,0644,$(SYSCONFDIR),dicomcopyd)
InstallTargetRename(dicomcopyd.logrotate,root,bin,0644,$(LOGROTATEDIR),dicomcopyd)
InstallTarget($(DBCREAT),root,bin,0644,$(DPMSHAREDIR))

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)

install.man: $(MANDIR) $(DMONMANDIR) $(MANPAGES)

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

IMANPAGE(dicomcopyd,$(DMONMANDIR),$(DMONMANSUFFIX))

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

clean:
	-@RemoveFiles(FilesToClean)

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

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

Makefiles:

FORCE:

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

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