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 (226 lines) | stat: -rw-r--r-- 6,877 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
COMM
COMM  Copyright (C) 2004-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 srmv2.2 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_LIBS=-lglobus_gssapi_gsi -lglobus_gss_assist
#if UseVOMS
VOMS_LIB = -lvomsapi
SECLIB = -lcgsi_plugin_voms
#else
SECLIB = -lcgsi_plugin
#endif
SOAPLIB = -lgsoap
#else
#if defined(__STDC__)
GLOBUS_FLAVOUR=GlobusFlavour##pthr
VOMS_FLAVOUR=GlobusFlavour##pthr
#else
GLOBUS_FLAVOUR=GlobusFlavour/**/pthr
VOMS_FLAVOUR=GlobusFlavour/**/pthr
#endif
GLOBUS_LIBS=-L$(GLOBUS_LOCATION)/lib -lglobus_gssapi_gsi_$(GLOBUS_FLAVOUR) -lglobus_gss_assist_$(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)
BACKEND_LIBS = DepLibraryTargetName(dpmcopy,dpmcopy)
#if SOLARIS
LIBS = -L../shlib -ldpm -llcgdm -lsocket -lnsl
#else
LIBS = -L../shlib -ldpm -llcgdm
#endif
#ifndef darwin   
LIBS += -luuid
#endif
SPOOL = Srmv2_2Spool
LOGFILE = FileName($(SPOOL),log)
#if UseOracle
DBOBJS = ../dpm/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/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/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 $(MTCCFLAGS) $(DFLAGS) $(ORAINC) $(MYSINC) $(POSINC)
 
COMM######################### DEPENDENCY LIBRARIES ###############
 
DEPLIB = DepSharedLibraryTargetName(shlib,dpm)

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

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

SRV_OBJS = 	srmv2.Osuf \
		srmv2_dirreq.Osuf \
		srmv2_discovreq.Osuf \
		srmv2_permreq.Osuf \
		srmv2_spacereq.Osuf \
		srmv2_xferreq.Osuf \
		srm_util.Osuf \
		srmlogit.Osuf \
		$(DBOBJS) \
		../dpm/dpm_procsubr.Osuf \
		../dpm/dpm_util.Osuf \
		../dpm/dpmlogit.Osuf \
		$(STDSOAP_OBJS) \
		srmv2C.Osuf \
		srmv2Server.Osuf

all: $(SERVER)

srmv2Stub.h srmv2C.c srmv2Server.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

stdsoap2.Osuf: $(GSOAP_LOCATION)/src/stdsoap2.c
	$(CC) -c -g -I$(GSOAP_LOCATION)/include $(SOAPFLG) $(GSOAP_LOCATION)/src/stdsoap2.c

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

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

InstallProgram(srmv2.2,$(LIBFLAVOURDIR),root,bin,755)
InstallTargetRename(rc.srmv2.2,root,bin,0755,$(CONFFLAVOURDIR),srmv2.2.init)
InstallTargetRename(srmv2.2.conf.templ,root,bin,0644,$(CONFFLAVOURDIR),srmv2.2.conf)
InstallTarget(srmv2.2.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(srmv2.2,$(LIBFLAVOURDIR),$(DMONMANSUFFIX))

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

clean:
	-@RemoveFiles(*.Osuf *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:

MakeDepLibrary(dpmcopy,dpmcopy)

FORCE:

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

srmv2.Osuf: srmv2H.h srmSoapBinding.nsmap
srmv2_dirreq.Osuf: srmv2H.h
srmv2_discovreq.Osuf: srmv2H.h
srmv2_permreq.Osuf: srmv2H.h
srmv2_spacereq.Osuf: srmv2H.h
srmv2_xferreq.Osuf: srmv2H.h

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