Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
22 magnus 1
# Makefile template built by pmkscan (2008-05-17 20:40)
2
# @configure_input@
3
 
4
 
5
# build tools
6
CC=		@CC@
7
CFLAGS=		@CFLAGS@
8
CLDFLAGS=	@CLDFLAGS@
9
CXX=		@CXX@
10
CXXFLAGS=	@CXXFLAGS@
11
CXXLDFLAGS=	@CXXLDFLAGS@ @LIBS@
12
SLCXXFLAGS=	@SLCXXFLAGS@
13
SLCXXLDFLAGS=	@SLCXXLDFLAGS@
14
AR=		@AR@
15
ARFLAGS=	cru
16
RANLIB=		@RANLIB@
17
INSTALL=	@INSTALL@
18
RM=		rm
19
RMFLAGS=	-rf
20
 
21
 
22
# tool aliases
23
INSTALL_BIN=	$(INSTALL) -m 755
24
INSTALL_SBIN=	$(INSTALL) -m 755
25
INSTALL_STLIB=	$(INSTALL) -m 644
26
INSTALL_SHLIB=	$(INSTALL) -m 755
27
INSTALL_DATA=	$(INSTALL) -D -m 644
28
INSTALL_DIR=	$(INSTALL) -d -m 755
29
INSTALL_MAN=	$(INSTALL) -m 644
30
 
31
 
32
# specific directories
33
PREFIX=		@PREFIX@
34
BINDIR=		@BINDIR@
35
SBINDIR=	@SBINDIR@
36
DATADIR=	@DATADIR@
37
LIBDIR=		@LIBDIR@
38
INCDIR=		@INCDIR@
39
SYSCONFDIR=	@SYSCONFDIR@
40
 
41
# packaging
42
PACKAGE=	@PACKAGE@
43
 
44
 
45
#
46
# list of generated files
47
#
48
GEN_FILES=	Makefile config.h
49
 
50
#
51
# source dependency lists
52
#
53
DKIM_SRCS=	dkim.cpp dkim.h dkimbase.h dkimsign.h dkimverify.h resource.h
54
 
55
DKIMBASE_SRCS=	dkim.h dkimbase.cpp dkimbase.h
56
 
57
DKIMSIGN_SRCS=	dkim.h dkimbase.h dkimsign.cpp dkimsign.h
58
 
59
DKIMVERIFY_SRCS=	dkim.h dkimbase.h dkimverify.cpp dkimverify.h dns.h
60
 
61
DNS_SRCS=	dkim.h dns.cpp dns.h dnsresolv.h
62
 
63
DNSRESOLV_SRCS=	dnsresolv.cpp dnsresolv.h
64
 
65
LIBDKIMTEST_SRCS=	dkim.h dns.h libdkimtest.cpp
66
 
67
#
68
# binary name macros
69
#
70
LIBDKIMTEST=	libdkimtest
71
 
72
#
73
# library name macros
74
#
75
LIBDKIM=	libdkim
76
LIBDKIM_STATIC=	@LIBDKIM_STATIC@
77
LIBDKIM_SHARED=	@LIBDKIM_SHARED@
78
LIBDKIM_HEADERS=	dkim.h
79
 
80
#
81
# binary target dependency lists
82
#
83
LIBDKIMTEST_OBJS=	dkim.o dkimbase.o dkimverify.o dkimsign.o dns.o dnsresolv.o libdkimtest.o
84
 
85
#
86
# library target dependency lists
87
#
88
LIBDKIM_OBJS=	dkim.o dkimbase.o dkimsign.o dkimverify.o dns.o \
89
		dnsresolv.o
90
 
91
#
92
# target lists
93
#
94
 
95
# building
96
BUILD_TARGETS=	$(ALL_BIN_TARGETS) $(LIB_BUILD_TARGETS)
97
 
98
ALL_BIN_TARGETS=	$(LIBDKIMTEST)
99
 
100
LIB_BUILD_TARGETS=	static_libs $(SHARED_LIB_TARGETS)
101
 
102
STATIC_LIB_TARGETS=	$(LIBDKIM_STATIC)
103
 
104
SHARED_LIB_TARGETS=	@SHARED_LIB_TARGETS@
105
 
106
CXX_SHLIB_TARGETS=	$(LIBDKIM_SHARED)
107
 
108
# cleaning
109
CLEAN_TARGETS=	$(BIN_CLEAN_TARGETS) $(LIB_CLEAN_TARGETS)
110
 
111
BIN_CLEAN_TARGETS=	$(LIBDKIMTEST)_clean
112
 
113
LIB_CLEAN_TARGETS=	static_libs_clean $(SHLIB_CLEAN_TARGETS)
114
 
115
STLIB_CLEAN_TARGETS=	$(LIBDKIM)_static_clean
116
 
117
SHLIB_CLEAN_TARGETS=	@SHLIB_CLEAN_TARGETS@
118
 
119
CXX_SHLIB_CLEAN_TARGETS=	$(LIBDKIM)_shared_clean
120
 
121
# installing
122
INSTALL_TARGETS=	install_bin install_lib
123
 
124
BIN_INSTALL_TARGETS=	$(LIBDKIMTEST)_install
125
 
126
LIB_INSTALL_TARGETS=	lib_headers_install static_libs_install $(SHLIB_INST_TARGETS)
127
 
128
STLIB_INST_TARGETS=	$(LIBDKIM)_static_install
129
 
130
SHLIB_INST_TARGETS=	@SHLIB_INST_TARGETS@
131
 
132
CXX_SHLIB_INST_TARGETS=	$(LIBDKIM)_shared_install
133
 
134
# deinstalling
135
DEINSTALL_TARGETS=	$(BIN_DEINSTALL_TARGETS) $(LIB_DEINSTALL_TARGETS)
136
 
137
BIN_DEINSTALL_TARGETS=	$(LIBDKIMTEST)_deinstall
138
 
139
LIB_DEINSTALL_TARGETS=	lib_headers_deinstall static_libs_deinstall $(SHLIB_DEINST_TARGETS)
140
 
141
STLIB_DEINST_TARGETS=	$(LIBDKIM)_static_deinstall
142
 
143
SHLIB_DEINST_TARGETS=	@SHLIB_DEINST_TARGETS@
144
 
145
CXX_SHLIB_DEINST_TARGETS=	$(LIBDKIM)_shared_deinstall
146
 
147
# by default we consider all binaries as non privileged
148
BIN_FILES=	$(ALL_BIN_TARGETS)
149
 
150
# move privileged binaries here if needed
151
SBIN_FILES=
152
 
153
.SUFFIXES: .o .s .c .C .cc .cxx .cpp
154
 
155
# C suffixes
156
.c.o:
157
	$(CC) $(CFLAGS) $(SLCFLAGS) -o $@ -c $<
158
 
159
.C.o:
160
	$(CC) $(CFLAGS) $(SLCFLAGS) -o $@ -c $<
161
 
162
.cc.o:
163
	$(CC) $(CFLAGS) $(SLCFLAGS) -o $@ -c $<
164
 
165
# C++ suffixes
166
.cxx.o:
167
	$(CXX) $(CXXFLAGS) $(SLCXXFLAGS) -o $@ -c $<
168
 
169
.cpp.o:
170
	$(CXX) $(CXXFLAGS) $(SLCXXFLAGS) -o $@ -c $<
171
 
172
 
173
#
174
# generic targets
175
#
176
all: $(BUILD_TARGETS)
177
 
178
clean: $(CLEAN_TARGETS)
179
 
180
install: $(INSTALL_TARGETS)
181
 
182
deinstall: $(DEINSTALL_TARGETS)
183
 
184
distclean: clean
185
	$(RM) $(RMFLAGS) $(GEN_FILES)
186
 
187
#
188
# object rules
189
#
190
dkim.o: $(DKIM_SRCS)
191
 
192
 
193
dkimbase.o: $(DKIMBASE_SRCS)
194
 
195
 
196
dkimsign.o: $(DKIMSIGN_SRCS)
197
 
198
 
199
dkimverify.o: $(DKIMVERIFY_SRCS)
200
 
201
 
202
dns.o: $(DNS_SRCS)
203
 
204
 
205
dnsresolv.o: $(DNSRESOLV_SRCS)
206
 
207
 
208
libdkimtest.o: $(LIBDKIMTEST_SRCS)
209
 
210
 
211
#
212
# binary target rules
213
#
214
 
215
# main binary install target
216
install_bin: install_bindir $(BIN_INSTALL_TARGETS)
217
 
218
# install binary directory
219
install_bindir:
220
	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
221
 
222
# libdkimtest binary targets
223
$(LIBDKIMTEST): $(LIBDKIMTEST_OBJS)
224
	$(CXX) $(CXXLDFLAGS) -o $@ $(LIBDKIMTEST_OBJS)
225
 
226
$(LIBDKIMTEST)_clean:
227
	$(RM) $(RMFLAGS) $(LIBDKIMTEST_OBJS)
228
	$(RM) $(RMFLAGS) $(LIBDKIMTEST)
229
 
230
$(LIBDKIMTEST)_install: $(LIBDKIMTEST)
231
	$(INSTALL_BIN) $(LIBDKIMTEST) $(DESTDIR)$(BINDIR)/$(LIBDKIMTEST)
232
 
233
$(LIBDKIMTEST)_deinstall:
234
	$(RM) $(RMFLAGS) $(DESTDIR)$(BINDIR)/$(LIBDKIMTEST)
235
 
236
#
237
# library target rules
238
#
239
 
240
# main library install target
241
install_lib: install_libdir $(LIB_INSTALL_TARGETS)
242
 
243
# install library directory
244
install_libdir:
245
	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
246
 
247
 
248
# library headers install target
249
lib_headers_install: $(LIBDKIM)_headers_install
250
 
251
 
252
# library headers deinstall target
253
lib_headers_deinstall: $(LIBDKIM)_headers_deinstall
254
 
255
# static library targets
256
static_libs: $(STATIC_LIB_TARGETS)
257
 
258
static_libs_clean: $(STLIB_CLEAN_TARGETS)
259
 
260
static_libs_install: $(STLIB_INST_TARGETS)
261
 
262
static_libs_deinstall: $(STLIB_DEINST_TARGETS)
263
 
264
# C++ language shared library targets
265
cxx_shared_libs: $(CXX_SHLIB_TARGETS)
266
 
267
cxx_shared_libs_clean: $(CXX_SHLIB_CLEAN_TARGETS)
268
 
269
cxx_shared_libs_install: $(CXX_SHLIB_INST_TARGETS)
270
 
271
cxx_shared_libs_deinstall: $(CXX_SHLIB_DEINST_TARGETS)
272
 
273
 
274
# libdkim library targets
275
$(LIBDKIM)_headers_install: $(LIBDKIM_HEADERS)
276
	$(INSTALL_DATA) dkim.h $(DESTDIR)$(INCDIR)/dkim.h
277
 
278
$(LIBDKIM)_headers_deinstall:
279
	$(RM) $(RMFLAGS) $(DESTDIR)$(INCDIR)/dkim.h
280
 
281
$(LIBDKIM)_clean:
282
	$(RM) $(RMFLAGS) $(LIBDKIM_OBJS)
283
 
284
$(LIBDKIM_STATIC): $(LIBDKIM_OBJS)
285
	$(AR) $(ARFLAGS) $@ $(LIBDKIM_OBJS)
286
	$(RANLIB) $@
287
 
288
$(LIBDKIM)_static_clean: $(LIBDKIM)_clean
289
	$(RM) $(RMFLAGS) $(LIBDKIM_STATIC)
290
 
291
$(LIBDKIM)_static_install: $(LIBDKIM_STATIC)
292
	$(INSTALL_STLIB) $(LIBDKIM_STATIC) $(DESTDIR)$(LIBDIR)/$(LIBDKIM_STATIC)
293
 
294
$(LIBDKIM)_static_deinstall:
295
	$(RM) $(RMFLAGS) $(DESTDIR)$(LIBDIR)/$(LIBDKIM_STATIC)
296
 
297
$(LIBDKIM_SHARED): $(LIBDKIM_OBJS)
298
	$(CXX) $(CXXLDFLAGS) $(SLCXXLDFLAGS) -o $@ $(LIBDKIM_OBJS)
299
 
300
$(LIBDKIM)_shared_clean: $(LIBDKIM)_clean
301
	$(RM) $(RMFLAGS) $(LIBDKIM_SHARED)
302
 
303
$(LIBDKIM)_shared_install: $(LIBDKIM_SHARED)
304
	$(INSTALL_SHLIB) $(LIBDKIM_SHARED) $(DESTDIR)$(LIBDIR)/$(LIBDKIM_SHARED)
305
        ln -sf $(DESTDIR)$(LIBDIR)/$(LIBDKIM_SHARED) $(DESTDIR)$(LIBDIR)/libdkim.so
306
 
307
$(LIBDKIM)_shared_deinstall:
308
	$(RM) $(RMFLAGS) $(DESTDIR)$(LIBDIR)/$(LIBDKIM_SHARED)
309
 
310
 
311