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 (238 lines) | stat: -rw-r--r-- 7,918 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
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 dpmcopyd server

DPMSHAREDIR = FileName($(SHAREDIR),lcgdm)
#if BuildSecurity
CSECFLAG = -DCSEC
LIBCSEC = -ldl
#if UseVirtualIds
VIDFLAG = -DVIRTUAL_ID
#endif
#if UseVOMS
VOMSFLAG = -DUSE_VOMS
VOMS_LOCATION=VomsLocation
#endif
#endif
DPMCONFIG = DpmConfigFile
GSOAP_LOCATION=GsoapLocation
GSOAP_VERSION=GsoapVersion
WSDL2H_FLAGS=GsoapWsdl2hFlags
CGSI_GSOAP_LOCATION=CgsiGsoapLocation
GLOBUS_LOCATION=GlobusLocation
#if EMIBuild
GLOBUS_INCLUDES=-I$(GLOBUS_LOCATION)/include/globus -I$(GLOBUS_LOCATION)/$(_lib)/globus/include -I$(GLOBUS_LOCATION)/include/$(DEB_HOST_MULTIARCH)/globus
GLOBUS_LIBS=-lglobus_gssapi_gsi -lglobus_gss_assist -lglobus_common
GGC_LIB=-lglobus_gass_copy -lglobus_ftp_client -lglobus_common
#if UseVOMS
VOMS_LIB = -lvomsapi
SECLIB = -lcgsi_plugin_voms
#else
SECLIB = -lcgsi_plugin
#endif
SOAPLIB = -lgsoap
#else
GLOBUS_FLAVOUR=GlobusFlavour
VOMS_FLAVOUR=GlobusFlavour
GLOBUS_INCLUDES=-I$(GLOBUS_LOCATION)/include/$(GLOBUS_FLAVOUR)
GLOBUS_LIBS=-L$(GLOBUS_LOCATION)/lib -lglobus_gssapi_gsi_$(GLOBUS_FLAVOUR) -lglobus_gss_assist_$(GLOBUS_FLAVOUR) -lglobus_common_$(GLOBUS_FLAVOUR)
GGC_LIB=-lglobus_gass_copy_$(GLOBUS_FLAVOUR) -lglobus_ftp_client_$(GLOBUS_FLAVOUR) -lglobus_common_$(GLOBUS_FLAVOUR)
#if UseVOMS
VOMS_LIB = -L$(VOMS_LOCATION)/$(_lib) -L$(VOMS_LOCATION)/lib -lvomsapi_$(VOMS_FLAVOUR)
SECLIB = -L$(CGSI_GSOAP_LOCATION)/$(_lib) -L$(CGSI_GSOAP_LOCATION)/lib -lcgsi_plugin_voms_gsoap_$(GSOAP_VERSION)_$(GLOBUS_FLAVOUR) $(VOMS_LIB) $(GLOBUS_LIBS)
#else
SECLIB = -L$(CGSI_GSOAP_LOCATION)/$(_lib) -L$(CGSI_GSOAP_LOCATION)/lib -lcgsi_plugin_gsoap_$(GSOAP_VERSION) $(GLOBUS_LIBS)
#endif
STDSOAP_OBJS = stdsoap2.Osuf
#endif
SOAPFLG = -DWITH_IPV6
INCLUDES = FileName(..,h)
#if SOLARIS
LIBS = -L../shlib -ldpm -llcgdm -lsocket -lnsl
#else
LIBS = -L../shlib -ldpm -llcgdm
#endif
SPOOL = DpmcopySpool
LOGFILE = FileName($(SPOOL),log)
#if UseOracle
DBOBJS = dpm_oracle_ifce.Osuf
ORAFLG = -DUSE_ORACLE
ifdef ORACLE_INCLUDE
ORAINC = -I$(ORACLE_INCLUDE)
else
ORAINC = -I$(ORACLE_HOME)/precomp/public
endif
#else
#if UseMySQL
DBOBJS = dpm_mysql_ifce.Osuf
MYSFLG = -DUSE_MYSQL
MYSQL_LOCATION = MySQLLocation
MYSINC = -I$(MYSQL_LOCATION)/include/mysql
LIBMYS = -L$(MYSQL_LOCATION)/$(_lib)/mysql -lmysqlclient
#else
#if UsePostgres
DBOBJS = dpm_libpq_ifce.Osuf
POSFLG = -DUSE_POSTGRES
LIBPOS = -lpq
#endif
#endif
#endif

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

DFLAGS = -DDPMCONFIG=\"$(DPMCONFIG)\" \
         -DLOGFILE=\"$(LOGFILE)\" \
         $(ORAFLG) $(MYSFLG) $(POSFLG) $(CSECFLAG) $(VIDFLAG) $(VOMSFLAG) $(SOAPFLG)
 
CFLAGS = -g -I$(INCLUDES) -I$(GSOAP_LOCATION)/include -I$(CGSI_GSOAP_LOCATION)/include $(DFLAGS) $(ORAINC) $(MYSINC) $(POSINC)
 
COMM######################### DEPENDENCY LIBRARIES ###############
 
DEPLIB = DepSharedLibraryTargetName(shlib,dpm)

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

MANPAGES = $(LIBFLAVOURDIR)/dpmcopyd.$(DMONMANSUFFIX)
SERVER = ProgramTargetName(dpmcopyd) \
	 rc.dpmcopyd \
	 dpmcopyd.conf.templ \
	 dpmcopyd.logrotate
IPROGS_D = FileName($(LIBFLAVOURDIR),ProgramTargetName(dpmcopyd)) \
	   FileName($(CONFFLAVOURDIR),dpmcopyd.init) \
	   FileName($(CONFFLAVOURDIR),dpmcopyd.conf) \
	   FileName($(CONFFLAVOURDIR),dpmcopyd.logrotate)

SRV_OBJS = 	dpmcopy_main.Osuf \
		dpmcopy_local.Osuf \
		dpmcopy_pull.Osuf \
		dpmcopy_push.Osuf \
		srmv2_ifce.Osuf \
		$(DBOBJS) \
		dpm_copyfile.Osuf \
		../dpm/dpm_util.Osuf \
		../dpm/dpmlogit.Osuf \
		../dpm/sendrep.Osuf \
		$(STDSOAP_OBJS) \
		srmv2C.Osuf \
		srmv2Client.Osuf

all: $(SERVER)

dpm_copyfile.c: DepSourceName(dpm,dpm_copyfile.c)
	RemoveFile(dpm_copyfile.c)
	$(CP) DepSourceName(dpm,dpm_copyfile.c) dpm_copyfile.c
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)
#define YES 1

srmv2Stub.h srmv2C.c srmv2Client.c srmSoapBinding.nsmap: srmv2H.h
srmv2H.h: srm.v2.2.h
	$(GSOAP_LOCATION)/bin/soapcpp2 -c -p srmv2 srm.v2.2.h
srm.v2.2.h: srm.v2.2.wsdl
	$(GSOAP_LOCATION)/bin/wsdl2h $(WSDL2H_FLAGS) -c -e -y -t typemap.dat srm.v2.2.wsdl

dpm_copyfile.Osuf: dpm_copyfile.c
	$(CC) $(CFLAGS) $(GLOBUS_INCLUDES) -c dpm_copyfile.c
dpmcopy_inc_reqctr.Osuf: dpmcopy_inc_reqctr.c
	$(CC) -c -g -I$(INCLUDES) $(MTCCFLAGS) $(CSECFLAG) dpmcopy_inc_reqctr.c
send2dpmcopyd.Osuf: send2dpmcopyd.c
	$(CC) -c -g -I$(INCLUDES) $(MTCCFLAGS) $(CSECFLAG) send2dpmcopyd.c
stdsoap2.Osuf: $(GSOAP_LOCATION)/src/stdsoap2.c
	$(CC) -c -g -I$(GSOAP_LOCATION)/include $(SOAPFLG) $(GSOAP_LOCATION)/src/stdsoap2.c

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

NormalLibraryTarget(dpmcopy,dpmcopy_inc_reqctr.Osuf send2dpmcopyd.Osuf)

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

InstallProgram(dpmcopyd,$(LIBFLAVOURDIR),root,bin,755)
InstallTargetRename(rc.dpmcopyd,root,bin,0755,$(CONFFLAVOURDIR),dpmcopyd.init)
InstallTargetRename(dpmcopyd.conf.templ,root,bin,0644,$(CONFFLAVOURDIR),dpmcopyd.conf)
InstallTarget(dpmcopyd.logrotate,root,bin,0644,$(CONFFLAVOURDIR))

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($(LIBFLAVOURDIR),root,bin,0755)
MakeDir($(CONFFLAVOURDIR),root,bin,0755)

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

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

IMANPAGE(dpmcopyd,$(LIBFLAVOURDIR),$(DMONMANSUFFIX))

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

clean:
	-@RemoveFiles(FilesToClean *H.h *Object.h *Proxy.h *Stub.h *C.c *Client.c *Lib.c *Server.c *.nsmap *.xml srm.v2.2.h)

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 ##########################

srmv2_ifce.Osuf: srmv2H.h srmSoapBinding.nsmap

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