|
1 # |
|
2 # This Source Code Form is subject to the terms of the Mozilla Public |
|
3 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 |
|
6 SHELL = /bin/sh |
|
7 .SUFFIXES: |
|
8 .SUFFIXES: .c .o .h .in .a .so |
|
9 |
|
10 srcdir = @srcdir@ |
|
11 VPATH = @srcdir@ |
|
12 prefix = @prefix@ |
|
13 exec_prefix = @exec_prefix@ |
|
14 includedir = @includedir@ |
|
15 bindir = @bindir@ |
|
16 @SET_MAKE@ |
|
17 INSTALL = @INSTALL@ |
|
18 RANLIB = @RANLIB@ |
|
19 AR = @AR@ |
|
20 CC = @CC@ |
|
21 LD = @LD@ |
|
22 RM = @RM@ |
|
23 TAR = @TAR@ |
|
24 |
|
25 CPPFLAGS = @CPPFLAGS@ |
|
26 CFLAGS = @CFLAGS@ |
|
27 LDFLAGS = @LDFLAGS@ |
|
28 LIBS = @LIBS@ |
|
29 |
|
30 INSTALL_PROGRAM = $(INSTALL) -m 0500 |
|
31 |
|
32 all:: program |
|
33 |
|
34 # Standard Netscape/Mozilla targets: |
|
35 # import import_xp export private_export libs program install all clobber |
|
36 # clobber_all release release_xp alltags |
|
37 |
|
38 # Standard GNU targets: |
|
39 # all install uninstall install-strip clean distclean mostlyclean |
|
40 # maintainer-clean TAGS info dvi dist check installcheck installdirs |
|
41 |
|
42 # === The actual targets and the real commands that make them === |
|
43 program:: trivial |
|
44 |
|
45 trivial: trivial.c config.h Makefile |
|
46 $(CC) -I. -I${srcdir} $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LDFLAGS) $(LIBS) |
|
47 |
|
48 # Now, various standard targets, some that do stuff, some that are no-ops |
|
49 |
|
50 import:: |
|
51 |
|
52 export:: install |
|
53 |
|
54 private_export:: |
|
55 |
|
56 program:: |
|
57 |
|
58 clobber:: clean |
|
59 |
|
60 clobber_all:: maintainer-clean |
|
61 |
|
62 alltags:: TAGS |
|
63 |
|
64 RESULTS = \ |
|
65 $(DESTDIR)$(bindir)/trivial \ |
|
66 $(NULL) |
|
67 |
|
68 install:: $(RESULTS) |
|
69 |
|
70 $(DESTDIR)$(bindir)/trivial: trivial |
|
71 $(INSTALL_PROGRAM) trivial $(DESTDIR)$(bindir)/trivial |
|
72 |
|
73 # "rm -f" with no arguments bites on some platforms. |
|
74 # There should be an autoconf check and maybe a more |
|
75 # general $(FORCEDREMOVE) command |
|
76 |
|
77 uninstall:: |
|
78 $(RM) -f $(RESULTS) |
|
79 |
|
80 install-strip:: |
|
81 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s ' install |
|
82 |
|
83 clean:: |
|
84 $(RM) -f *~ core trivial.o trivial |
|
85 |
|
86 distclean:: clean |
|
87 $(RM) -f Makefile config.cache config.h config.log config.status stamp-h stamp-h.in |
|
88 |
|
89 mostlyclean:: clean |
|
90 |
|
91 maintainer-clean:: distclean |
|
92 $(RM) -f TAGS trivial*.tar.gz |
|
93 |
|
94 TAGS:: |
|
95 |
|
96 DISTFILES = \ |
|
97 .cvsignore \ |
|
98 README.txt \ |
|
99 Makefile.in \ |
|
100 acconfig.h \ |
|
101 config.h.in \ |
|
102 configure \ |
|
103 configure.in \ |
|
104 install-sh \ |
|
105 trivial.c \ |
|
106 $(NULL) |
|
107 |
|
108 dist:: trivial.tar.gz |
|
109 |
|
110 # There must be an easier and more portable way of doing this.. |
|
111 trivial.tar.gz: $(DISTFILES) |
|
112 echo $(DISTFILES) | tr ' ' '\n' | sed "s^.*^`( cd ${srcdir}; pwd ) | xargs basename`/&^" | xargs tar czf $@ -C ${srcdir}/.. |
|
113 |
|
114 # other "standard" but irrelevant targets |
|
115 info:: |
|
116 |
|
117 dvi:: |
|
118 |
|
119 check:: |
|
120 |
|
121 installcheck:: |
|
122 |
|
123 installdirs:: |
|
124 |
|
125 # Include dependancies |
|
126 |
|
127 |
|
128 # autoheader might not change config.h.in, so touch a stamp file |
|
129 ${srcdir}/config.h.in: stamp-h.in |
|
130 ${srcdir}/stamp-h.in: configure.in acconfig.h |
|
131 cd ${srcdir} && autoheader |
|
132 echo timestamp > ${srcdir}/stamp-h.in |
|
133 |
|
134 # Remake the configuration |
|
135 ${srcdir}/configure: configure.in |
|
136 cd ${srcdir} && autoconf |
|
137 |
|
138 config.h: stamp-h |
|
139 stamp-h: config.h.in config.status |
|
140 ./config.status |
|
141 |
|
142 Makefile: Makefile.in config.status |
|
143 ./config.status |
|
144 |
|
145 config.status: configure |
|
146 ./config.status --recheck |