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 (276 lines) | stat: -rw-r--r-- 9,632 bytes parent folder | download | duplicates (3)
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
COMM
COMM  Copyright (C) 2003-2010 by CERN/IT/ADC/CA
COMM  All rights reserved
COMM
COMM       @(#)$RCSfile: Imakefile,v $ $Revision: 6384 $ $Date: 2012-06-06 16:39:34 +0200 (Wed, 06 Jun 2012) $ CERN IT/ADC/CA  Ben Couturier
 
COMM    Make CASTOR Security package

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

#include <Project.tmpl>

include FileName(..,VERSION)

INCLUDES = FileName(..,h)
LIBBASE = InstallLibDir
LIB = $(LIBBASE)/lcgdm

#if UseKRB5
#define KRB5Mech KRB5
#if UseHeimdalKrb5
#define SecAuthMechKRB5    -DKRB5 -DHEIMDAL
#else
#define SecAuthMechKRB5    -DKRB5 
#endif
#define SecIncludeDirKRB5 $(shell Krb5Config gssapi --cflags)
#define SecLibsKRB5 $(shell Krb5Config gssapi --libs)
#else
#define KRB5Mech
#endif

#if UseGSI
GLOBUS_LOCATION=GlobusLocation
#if UseVOMS
VOMS_LOCATION=VomsLocation
#endif
#if EMIBuild
#if UseVOMS
VOMS_INCLUDE=-I$(VOMS_LOCATION)/include/voms -DUSE_VOMS
VOMS_LIB=-lvomsapi
#endif
#else
GLOBUS_FLAVOUR_NONPTHR=GlobusFlavour
VOMS_FLAVOUR_NONPTHR=GlobusFlavour
#if defined(__STDC__)
GLOBUS_FLAVOUR=GlobusFlavour##pthr
VOMS_FLAVOUR=GlobusFlavour##pthr
#else
GLOBUS_FLAVOUR=GlobusFlavour/**/pthr
VOMS_FLAVOUR=GlobusFlavour/**/pthr
#endif
#if UseVOMS
VOMS_INCLUDE=-I$(VOMS_LOCATION)/include/glite/security/voms -DUSE_VOMS
VOMS_LIB=-L$(VOMS_LOCATION)/$(_lib) -L$(VOMS_LOCATION)/lib -lvomsapi_$(VOMS_FLAVOUR)
#endif
#endif
#define GSIMech GSI
#define SecAuthMechGSI       -DGSI
#if EMIBuild
#define SecIncludeDirGSI -I$(GLOBUS_LOCATION)/include/globus -I$(GLOBUS_LOCATION)/$(_lib)/globus/include -I$(GLOBUS_LOCATION)/include/$(DEB_HOST_MULTIARCH)/globus $(VOMS_INCLUDE)
#define SecLibsGSI -lglobus_gssapi_gsi -lglobus_gss_assist -lglobus_gsi_credential -lglobus_gsi_callback -lglobus_gsi_cert_utils -lglobus_common $(VOMS_LIB) -lssl -lcrypto
#else
#define SecIncludeDirGSI -I$(GLOBUS_LOCATION)/include/$(GLOBUS_FLAVOUR_NONPTHR) $(VOMS_INCLUDE) 
#define SecLibsGSI -L$(GLOBUS_LOCATION)/lib -lglobus_gssapi_gsi_$(GLOBUS_FLAVOUR_NONPTHR) -lglobus_gss_assist_$(GLOBUS_FLAVOUR_NONPTHR) -lglobus_gsi_credential_$(GLOBUS_FLAVOUR_NONPTHR) -lglobus_gsi_callback_$(GLOBUS_FLAVOUR_NONPTHR) -lglobus_gsi_cert_utils_$(GLOBUS_FLAVOUR_NONPTHR) -lglobus_common_$(GLOBUS_FLAVOUR_NONPTHR) $(VOMS_LIB) -lssl -lcrypto
#define SecIncludeDirGSIpthr -I$(GLOBUS_LOCATION)/include/$(GLOBUS_FLAVOUR) $(VOMS_INCLUDE)
#define SecLibsGSIpthr -L$(GLOBUS_LOCATION)/lib -lglobus_gssapi_gsi_$(GLOBUS_FLAVOUR) -lglobus_gss_assist_$(GLOBUS_FLAVOUR) -lglobus_gsi_credential_$(GLOBUS_FLAVOUR) -lglobus_gsi_callback_$(GLOBUS_FLAVOUR) -lglobus_gsi_cert_utils_$(GLOBUS_FLAVOUR) -lglobus_common_$(GLOBUS_FLAVOUR) $(VOMS_LIB) -lssl -lcrypto
#endif
#else
#define GSIMech
#endif

#if UseKRB4
#define KRB4Mech KRB4
#define SecIncludeDirKRB4 $(shell Krb4Config  --cflags)
#define SecLibsKRB4 $(shell Krb4Config  --libs)
#else
#define KRB4Mech
#endif

#define IDMech ID

#define CSEC_Mechlist KRB5Mech GSIMech KRB4Mech IDMech

SECLIB = LibraryTargetName(security)
SECLIB_UTIL_OBJS = Csec_errmsg.Osuf Csec_apiinit.Osuf Csec_common.Osuf
SECLIB_OBJS = Csec_api_loader.Osuf Csec_protocol_policy.Osuf Csec_api.Osuf $(SECLIB_UTIL_OBJS)

#if SecMakeStaticLibrary
SECLIB_STATIC_OBJS =  Csec_static_loader.Osuf Csec_plugin_ID.Osuf 
#if UseKRB5
SECLIB_GSS_OBJS = Csec_plugin_KRB5.Osuf Csec_plugin_KRB5_mapper.Osuf
#else
#if UseGSI
#if EMIBuild
SECLIB_GSS_OBJS = Csec_plugin_GSI.Osuf Csec_plugin_GSI_mapper.Osuf
#else
SECLIB_GSS_OBJS = Csec_plugin_GSI.Osuf Csec_plugin_GSI_mapper.Osuf Csec_plugin_GSI_pthr.Osuf Csec_plugin_GSI_pthr_mapper.Osuf
#endif
#else
#if UseKRB4
SECLIB_KRB4_OBJS = Csec_plugin_KRB4.Osuf
#endif
#endif
#endif
SECLIB_OBJS = Csec_protocol_policy.Osuf Csec_api.Osuf  $(SECLIB_UTIL_OBJS) $(SECLIB_STATIC_OBJS) $(SECLIB_GSS_OBJS) $(SECLIB_KRB4_OBJS)
#endif

CSEC_MECHLIST=CSEC_Mechlist
CFLAGS = $(DFLAGS) $(MTCCFLAGS) -g -DCSEC_DEFAULT_MECHS="\"$(CSEC_MECHLIST)\"" -I$(INCLUDES) 
LDFLAGS =  SecLibs

MANPAGES = $(LIBMANDIR)/Csec_api.$(LIBMANSUFFIX) 

#if ! SecMakeStaticLibrary
PLUGGINS = SharedLibraryTargetName(Csec_plugin_ID)
IPLUGGINS = FileName($(LIB),SharedLibraryTargetName(Csec_plugin_ID))
EPLUGGINS = FileName($(EXPORTLIB),SharedLibraryTargetName(Csec_plugin_ID))
#if UseGSI
PLUGGINS += SharedLibraryTargetName(Csec_plugin_GSI)
IPLUGGINS += FileName($(LIB),SharedLibraryTargetName(Csec_plugin_GSI))
EPLUGGINS += FileName($(EXPORTLIB),SharedLibraryTargetName(Csec_plugin_GSI))
#if ! EMIBuild
PLUGGINS += SharedLibraryTargetName(Csec_plugin_GSI_thread)
IPLUGGINS += FileName($(LIB),SharedLibraryTargetName(Csec_plugin_GSI_thread))
EPLUGGINS += FileName($(EXPORTLIB),SharedLibraryTargetName(Csec_plugin_GSI_thread))
#endif
#endif
#if UseKRB5
PLUGGINS += SharedLibraryTargetName(Csec_plugin_KRB5)
IPLUGGINS += FileName($(LIB),SharedLibraryTargetName(Csec_plugin_KRB5))
EPLUGGINS += FileName($(EXPORTLIB),SharedLibraryTargetName(Csec_plugin_KRB5))
#endif
#if UseKRB4
PLUGGINS += SharedLibraryTargetName(Csec_plugin_KRB4)
IPLUGGINS += FileName($(LIB),SharedLibraryTargetName(Csec_plugin_KRB4))
EPLUGGINS += FileName($(EXPORTLIB),SharedLibraryTargetName(Csec_plugin_KRB4))
#endif
#endif

all: $(SECLIB) $(PLUGGINS)

#if  SecMakeStaticLibrary

NormalLibraryTarget(security,$(SECLIB_OBJS))

#if UseGSI
Csec_static_loader.Osuf: Csec_static_loader.c
	$(CC) $(CFLAGS) SecAuthMechGSI -o $@ -c Csec_static_loader.c
Csec_plugin_GSI.Osuf: Csec_plugin_GSS.c
	$(CC) $(CFLAGS) SecAuthMechGSI SecIncludeDirGSI	-o $@ -c Csec_plugin_GSS.c

Csec_plugin_GSI_mapper.Osuf:  Csec_plugin_GSS_mapper.c
	$(CC) $(CFLAGS) SecAuthMechGSI SecIncludeDirGSI	-o $@ -c Csec_plugin_GSS_mapper.c

Csec_plugin_GSI_pthr.Osuf: Csec_plugin_GSS.c
	$(CC) $(CFLAGS) SecAuthMechGSI -Dwith_pthr_suffix SecIncludeDirGSIpthr	-o $@ -c Csec_plugin_GSS.c

Csec_plugin_GSI_pthr_mapper.Osuf:  Csec_plugin_GSS_mapper.c
	$(CC) $(CFLAGS) SecAuthMechGSI -Dwith_pthr_suffix SecIncludeDirGSIpthr	-o $@ -c Csec_plugin_GSS_mapper.c
#else
#if UseKRB5
Csec_static_loader.Osuf: Csec_static_loader.c
	$(CC) $(CFLAGS) SecAuthMechKRB5	-o $@ -c Csec_static_loader.c
Csec_plugin_KRB5.Osuf: Csec_plugin_GSS.c
	$(CC) $(CFLAGS) SecAuthMechKRB5 SecIncludeDirKRB5	-o $@ -c Csec_plugin_GSS.c

Csec_plugin_KRB5_mapper.Osuf:  Csec_plugin_GSS_mapper.c
	$(CC) $(CFLAGS) SecAuthMechKRB5 SecIncludeDirKRB5	-o $@ -c Csec_plugin_GSS_mapper.c
#else
#if UseKRB4
Csec_static_loader.Osuf: Csec_static_loader.c
	$(CC) $(CFLAGS) SecIncludeDirKRB4	-o $@ -c Csec_static_loader.c
Csec_plugin_KRB4.Osuf: Csec_plugin_KRB4.c 
	$(CC) $(CFLAGS) SecIncludeDirKRB4	-o $@ -c Csec_plugin_KRB4.c
#endif
#endif
#endif
#else

NormalLibraryTarget(security,$(SECLIB_OBJS))

Csec_api_loader.Osuf: Csec_api_loader.c
	$(CC) $(CFLAGS) -DLIBDIR='"$(LIB)"' -c -o Csec_api_loader.Osuf Csec_api_loader.c

#if UseGSI
SharedLibraryTargetName(Csec_plugin_GSI_thread): Csec_plugin_GSI_pthr.Osuf Csec_plugin_GSI_pthr_mapper.Osuf
	$(LD)  $(SHLIBLDFLAGS) -o $@ Csec_plugin_GSI_pthr.Osuf Csec_plugin_GSI_pthr_mapper.Osuf SecLibsGSIpthr $(SHLIBREQLIBS)

SharedLibraryTargetName(Csec_plugin_GSI): Csec_plugin_GSI.Osuf Csec_plugin_GSI_mapper.Osuf
	$(LD)  $(SHLIBLDFLAGS) -o $@ Csec_plugin_GSI.Osuf Csec_plugin_GSI_mapper.Osuf SecLibsGSI $(SHLIBREQLIBS)

Csec_plugin_GSI.Osuf: Csec_plugin_GSS.c
	$(CC) $(CFLAGS) SecAuthMechGSI SecIncludeDirGSI	-o $@ -c Csec_plugin_GSS.c

Csec_plugin_GSI_mapper.Osuf:  Csec_plugin_GSS_mapper.c
	$(CC) $(CFLAGS) SecAuthMechGSI SecIncludeDirGSI	-o $@ -c Csec_plugin_GSS_mapper.c

Csec_plugin_GSI_pthr.Osuf: Csec_plugin_GSS.c
	$(CC) $(CFLAGS) -Dwith_pthr_suffix SecAuthMechGSI SecIncludeDirGSIpthr	-o $@ -c Csec_plugin_GSS.c

Csec_plugin_GSI_pthr_mapper.Osuf:  Csec_plugin_GSS_mapper.c
	$(CC) $(CFLAGS) -Dwith_pthr_suffix SecAuthMechGSI SecIncludeDirGSIpthr	-o $@ -c Csec_plugin_GSS_mapper.c
#endif

#if UseKRB5
SharedLibraryTargetName(Csec_plugin_KRB5): Csec_plugin_KRB5.Osuf Csec_plugin_KRB5_mapper.Osuf
	$(LD)  $(SHLIBLDFLAGS) -o $@ Csec_plugin_KRB5.Osuf Csec_plugin_KRB5_mapper.Osuf SecLibsKRB5 $(SHLIBREQLIBS)

Csec_plugin_KRB5.Osuf: Csec_plugin_GSS.c
	$(CC) $(CFLAGS) SecAuthMechKRB5 SecIncludeDirKRB5	-o $@ -c Csec_plugin_GSS.c

Csec_plugin_KRB5_mapper.Osuf:  Csec_plugin_GSS_mapper.c
	$(CC) $(CFLAGS) SecAuthMechKRB5 SecIncludeDirKRB5	-o $@ -c Csec_plugin_GSS_mapper.c
#endif

#if UseKRB4
SharedLibraryTargetName(Csec_plugin_KRB4): Csec_plugin_KRB4.Osuf
	$(LD)  $(SHLIBLDFLAGS) -o $@ Csec_plugin_KRB4.Osuf SecLibsKRB4 $(SHLIBREQLIBS)

Csec_plugin_KRB4.Osuf: Csec_plugin_KRB4.c 
	$(CC) $(CFLAGS) SecIncludeDirKRB4	-o $@ -c Csec_plugin_KRB4.c
#endif

SharedLibraryTargetName(Csec_plugin_ID): Csec_plugin_ID.Osuf
	$(LD)  $(SHLIBLDFLAGS) -o $@ Csec_plugin_ID.Osuf $(SHLIBREQLIBS)

Csec_plugin_ID.Osuf: Csec_plugin_ID.c
	$(CC) $(CFLAGS) -o $@ -c Csec_plugin_ID.c

#endif

install: $(LIB) $(IPLUGGINS)

MakeDir($(LIB),root,bin,0755)

InstallPlugin(Csec_plugin_ID,$(LIB))
InstallPlugin(Csec_plugin_GSI,$(LIB))
InstallPlugin(Csec_plugin_GSI_thread,$(LIB))
InstallPlugin(Csec_plugin_KRB5,$(LIB))
InstallPlugin(Csec_plugin_KRB4,$(LIB))

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

install.man: $(LIBMANDIR) $(MANPAGES)

FILTERMANPAGE(Csec_api,Csec_api,$(LIBMANDIR),$(LIBMANSUFFIX))

export: $(EPLUGGINS)

exportman:

exportshr:

COMM###################### CLEANING RULES ########################
 
clean:
	-@RemoveFiles(FilesToClean) lib*.dylib lib*.so.[0-9] lib*.so.[0-9].[0-9].[0-9]
 
clobber:        clean
	-@RemoveFiles($(CLIENT))
 
#if _WIN32
depend:
	@echo Not supported on this platform
#else
depend:
	makedepend -Y$(INCLUDES) *.c 2> /dev/null
#endif

Makefiles:
 
FORCE:

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

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