Subversion Repositories

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

Rev 2 | Rev 5 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 4
1
# libdkim makefile for UNIX
1
# libdkim makefile for UNIX
2
#
2
#
3
srcdir = @srcdir@
3
srcdir = @srcdir@
4
VPATH = @srcdir@
4
VPATH = @srcdir@
5
5
6
prefix	=	@prefix@
6
prefix	=	@prefix@
7
exec_prefix =	@exec_prefix@
7
exec_prefix =	@exec_prefix@
8
bindir =	@bindir@
8
bindir =	@bindir@
9
libdir =	@libdir@
9
libdir =	@libdir@
10
includedir =	@includedir@
10
includedir =	@includedir@
11
11
12
OBJEXT = @OBJEXT@
12
OBJEXT = @OBJEXT@
13
LIBS    = @LIBS@ @libcrypto_LIBS@
13
LIBS    = @LIBS@ @libcrypto_LIBS@
14
14
15
CFLAGS = @CFLAGS@
15
CFLAGS = @CFLAGS@
16
CXXFLAGS = @CXXFLAGS@
16
CXXFLAGS = @CXXFLAGS@
17
CPPFLAGS = @CPPFLAGS@
17
CPPFLAGS = @CPPFLAGS@
18
18
19
INCL	= 
19
INCL	= 
20
LDFLAGS = @LDFLAGS@
20
LDFLAGS = @LDFLAGS@
21
21
22
libdkim_SOURCES = dkim.cpp dns.cpp dkimbase.cpp dkimsign.cpp dkimverify.cpp
22
libdkim_SOURCES = dkim.cpp dns.cpp dkimbase.cpp dkimsign.cpp dkimverify.cpp
23
HEADERS = dkim.h dns.h dkimbase.h dkimsign.h dkimverify.h
23
HEADERS = dkim.h dns.h dkimbase.h dkimsign.h dkimverify.h
24
24
25
libdkim_OBJS = $(libdkim_SOURCES:.cpp=.$(OBJEXT))
25
libdkim_OBJS = $(libdkim_SOURCES:.cpp=.$(OBJEXT))
26
libdkim_PURE_OBJS = $(libdkim_SOURCES:.cpp=.p$(OBJEXT))
26
libdkim_PURE_OBJS = $(libdkim_SOURCES:.cpp=.p$(OBJEXT))
27
27
28
libdkimtest_SOURCES = libdkimtest.cpp
28
libdkimtest_SOURCES = libdkimtest.cpp
29
libdkimtest_OBJS = libdkimtest.$(OBJEXT)
29
libdkimtest_OBJS = libdkimtest.$(OBJEXT)
30
30
31
SHLIBFORLINK = libdkim.so
31
SHLIBFORLINK = libdkim.so
32
SHLIBVERSCRIPT = debian/libdkim.ver
32
SHLIBVERSCRIPT = debian/libdkim.ver
33
SHLIBSONAME = $(SHLIBFORLINK).$(SHLIBMAJOR)
33
SHLIBSONAME = $(SHLIBFORLINK).$(SHLIBMAJOR)
34
SHLIBTARGET = $(SHLIBFORLINK)
34
SHLIBTARGET = $(SHLIBFORLINK)
35
SHLIBLINK = $(CXX) $(LDFLAGS) -shared -Wl,-soname=$(SHLIBSONAME) -Wl,-version-script=$(SHLIBVERSCRIPT)
35
SHLIBLINK = $(CXX) $(LDFLAGS) -shared -Wl,-soname=$(SHLIBSONAME) -Wl,-version-script=$(SHLIBVERSCRIPT)
36
SHLIBMAJOR = 0
36
SHLIBMAJOR = 0
37
SHLIBMINOR = 0
37
SHLIBMINOR = 0
38
SHLIBFILE = $(SHLIBSONAME).$(SHLIBMINOR)
38
SHLIBFILE = $(SHLIBSONAME).$(SHLIBMINOR)
39
SHLIBCFLAGS = -fPIC
39
SHLIBCFLAGS = -fPIC
40
40
41
ARFLAGS = crs
41
ARFLAGS = crs
42
42
43
TARGETS = libdkim.a $(SHLIBTARGET) libdkimtest
43
TARGETS = libdkim.a $(SHLIBTARGET) libdkimtest
44
44
45
all: $(TARGETS)
45
all: $(TARGETS)
46
46
47
libdkim.a: $(libdkim_OBJS)
47
libdkim.a: $(libdkim_OBJS)
48
	-rm -f $@
48
	-rm -f $@
49
	$(AR) $(ARFLAGS) $@ $(libdkim_OBJS)
49
	$(AR) $(ARFLAGS) $@ $(libdkim_OBJS)
50
50
51
$(SHLIBFORLINK): $(libdkim_PURE_OBJS) $(SHLIBVERSCRIPT)
51
$(SHLIBFORLINK): $(libdkim_PURE_OBJS) $(SHLIBVERSCRIPT)
52
	$(SHLIBLINK) -o $@ $(LIBS) $(libdkim_PURE_OBJS)
52
	$(SHLIBLINK) -o $@ $(LIBS) $(libdkim_PURE_OBJS)
53
	-mkdir .lib 2>/dev/null
53
	-mkdir .lib 2>/dev/null
54
	[ -z "$(SHLIBSONAME)" ] || (cd .lib \
54
	[ -z "$(SHLIBSONAME)" ] || (cd .lib \
55
          && ln -sf ../$(SHLIBFORLINK) $(SHLIBSONAME))
55
          && ln -sf ../$(SHLIBFORLINK) $(SHLIBSONAME))
56
56
57
libdkimtest: $(libdkimtest_OBJS) libdkim.a
57
libdkimtest: $(libdkimtest_OBJS) libdkim.a
58
	$(CXX) -static -o $@ libdkimtest.o libdkim.a $(LIBS)
58
	$(CXX) -static -o $@ libdkimtest.o libdkim.a $(LIBS)
59
59
60
libdkimtest.o: $(libdkimtest_SOURCES) $(HDRS)
60
libdkimtest.o: $(libdkimtest_SOURCES) $(HDRS)
61
	$(CXX) $(CXXFLAGS) -o $@ -c $<
61
	$(CXX) $(CXXFLAGS) -o $@ -c $<
62
62
63
%.$(OBJEXT): %.cpp $(HDRS)
63
%.$(OBJEXT): %.cpp $(HDRS)
64
	$(CXX) $(CXXFLAGS) -o $@ -c $<
64
	$(CXX) $(CXXFLAGS) -o $@ -c $<
65
65
66
%.p$(OBJEXT): %.cpp $(HDRS)
66
%.p$(OBJEXT): %.cpp $(HDRS)
67
	$(CXX) $(SHLIBCFLAGS) $(CXXFLAGS) -o $@ -c $<
67
	$(CXX) $(SHLIBCFLAGS) $(CXXFLAGS) -o $@ -c $<
68
68
69
clean:
69
clean:
70
	-rm -f *.$(OBJEXT) *.p$(OBJEXT) $(TARGETS)
70
	-rm -f *.$(OBJEXT) *.p$(OBJEXT) $(TARGETS)
71
	-rm -rf .lib
71
	-rm -rf .lib
72
72
73
distclean: clean
73
distclean: clean
74
	-rm -f config.status config.log Makefile libdkim.pc
74
	-rm -f config.status config.log Makefile libdkim.pc
75
75
76
install: all
76
install: all
77
	install -m 755 -d $(DESTDIR)$(libdir)
77
	install -m 755 -d $(DESTDIR)$(libdir)
78
	install -m 755 -d $(DESTDIR)$(libdir)/pkgconfig
78
	install -m 755 -d $(DESTDIR)$(libdir)/pkgconfig
79
	install -m 755 -d $(DESTDIR)$(includedir)
79
	install -m 755 -d $(DESTDIR)$(includedir)
80
	install -m 644 libdkim.a $(DESTDIR)$(libdir)
80
	install -m 644 libdkim.a $(DESTDIR)$(libdir)
81
	install -m 755 $(SHLIBFORLINK) $(DESTDIR)$(libdir)/$(SHLIBFILE)
81
	install -m 755 $(SHLIBFORLINK) $(DESTDIR)$(libdir)/$(SHLIBFILE)
82
	[ -z "$(SHLIBSONAME)" ] \
82
	[ -z "$(SHLIBSONAME)" ] \
83
                || (cd $(DESTDIR)$(libdir) \
83
                || (cd $(DESTDIR)$(libdir) \
84
		&& ln -sf $(SHLIBFILE) $(SHLIBSONAME) \
84
		&& ln -sf $(SHLIBFILE) $(SHLIBSONAME) \
85
		&& ln -sf $(SHLIBFILE) $(SHLIBFORLINK) )
85
		&& ln -sf $(SHLIBFILE) $(SHLIBFORLINK) )
86
	install -m 644 $(srcdir)/dkim.h $(DESTDIR)$(includedir)
86
	install -m 644 $(srcdir)/dkim.h $(DESTDIR)$(includedir)
87
	install -m 644 libdkim.pc $(DESTDIR)$(libdir)/pkgconfig
87
	install -m 644 libdkim.pc $(DESTDIR)$(libdir)/pkgconfig
88
88
89
.PHONY: all install clean distclean
89
.PHONY: all install clean distclean