blob: 7f94883504f351ebf5953f6245d00799061aaf6a (
plain)
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
|
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is a trivial PKCS#11 test program.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corp. Portions created by Netscape are
# Copyright (C) 2000. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. If you wish to allow use of your
# version of this file only under the terms of the GPL and not to
# allow others to use your version of this file under the MPL,
# indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by
# the GPL. If you do not delete the provisions above, a recipient
# may use your version of this file under either the MPL or the
# GPL.
#
MAKEFILE_IN_CVS_ID = "@(#) $RCSfile$ $Revision$ $Date$ $Name$"
SHELL = /bin/sh
.SUFFIXES:
.SUFFIXES: .c .o .h .in .a .so
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
bindir = @bindir@
@SET_MAKE@
INSTALL = @INSTALL@
RANLIB = @RANLIB@
AR = @AR@
CC = @CC@
LD = @LD@
RM = @RM@
TAR = @TAR@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INSTALL_PROGRAM = $(INSTALL) -m 0500
all:: program
# Standard Netscape/Mozilla targets:
# import import_xp export private_export libs program install all clobber
# clobber_all release release_xp alltags
# Standard GNU targets:
# all install uninstall install-strip clean distclean mostlyclean
# maintainer-clean TAGS info dvi dist check installcheck installdirs
# === The actual targets and the real commands that make them ===
program:: trivial
trivial: trivial.c config.h Makefile
$(CC) -I. -I${srcdir} $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LDFLAGS) $(LIBS)
# Now, various standard targets, some that do stuff, some that are no-ops
import::
export:: install
private_export::
program::
clobber:: clean
clobber_all:: maintainer-clean
alltags:: TAGS
RESULTS = \
$(DESTDIR)$(bindir)/trivial \
$(NULL)
install:: $(RESULTS)
$(DESTDIR)$(bindir)/trivial: trivial
$(INSTALL_PROGRAM) trivial $(DESTDIR)$(bindir)/trivial
# "rm -f" with no arguments bites on some platforms.
# There should be an autoconf check and maybe a more
# general $(FORCEDREMOVE) command
uninstall::
$(RM) -f $(RESULTS)
install-strip::
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s ' install
clean::
$(RM) -f *~ core trivial.o trivial
distclean:: clean
$(RM) -f Makefile config.cache config.h config.log config.status stamp-h stamp-h.in
mostlyclean:: clean
maintainer-clean:: distclean
$(RM) -f TAGS trivial*.tar.gz
TAGS::
DISTFILES = \
.cvsignore \
README.txt \
Makefile.in \
acconfig.h \
config.h.in \
configure \
configure.in \
install-sh \
trivial.c \
$(NULL)
dist:: trivial.tar.gz
# There must be an easier and more portable way of doing this..
trivial.tar.gz: $(DISTFILES)
echo $(DISTFILES) | tr ' ' '\n' | sed "s^.*^`( cd ${srcdir}; pwd ) | xargs basename`/&^" | xargs tar czf $@ -C ${srcdir}/..
# other "standard" but irrelevant targets
info::
dvi::
check::
installcheck::
installdirs::
# Include dependancies
# autoheader might not change config.h.in, so touch a stamp file
${srcdir}/config.h.in: stamp-h.in
${srcdir}/stamp-h.in: configure.in acconfig.h
cd ${srcdir} && autoheader
echo timestamp > ${srcdir}/stamp-h.in
# Remake the configuration
${srcdir}/configure: configure.in
cd ${srcdir} && autoconf
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
|