summaryrefslogtreecommitdiff
path: root/nss/tests/pkcs11/netscape/trivial/Makefile.in
blob: 4ac4da5e4e451fe47922c3587656e9ac37c85013 (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
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

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