Patch-ID: bash32-032
[bash.git] / examples / loadables / Makefile.in
blobf6208f5cc114559dccf7deffc8c90fff7fa139c8
2 # Simple makefile for the sample loadable builtins
4 # Copyright (C) 1996 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
20 # Include some boilerplate Gnu makefile definitions.
21 prefix = @prefix@
23 exec_prefix = @exec_prefix@
24 bindir = @bindir@
25 libdir = @libdir@
26 infodir = @infodir@
27 includedir = @includedir@
29 topdir = @top_srcdir@
30 BUILD_DIR = @BUILD_DIR@
31 srcdir = @srcdir@
32 VPATH = .:@srcdir@
34 @SET_MAKE@
35 CC = @CC@
36 RM = rm -f
38 SHELL = @MAKE_SHELL@
40 host_os = @host_os@
41 host_cpu = @host_cpu@
42 host_vendor = @host_vendor@
44 CFLAGS = @CFLAGS@
45 LOCAL_CFLAGS = @LOCAL_CFLAGS@
46 DEFS = @DEFS@
47 LOCAL_DEFS = @LOCAL_DEFS@
49 CPPFLAGS = @CPPFLAGS@
51 BASHINCDIR = ${topdir}/include
53 LIBBUILD = ${BUILD_DIR}/lib
55 INTL_LIBSRC = ${topdir}/lib/intl
56 INTL_BUILDDIR = ${LIBBUILD}/intl
57 INTL_INC = @INTL_INC@
58 LIBINTL_H = @LIBINTL_H@
60 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS)
63 # These values are generated for configure by ${topdir}/support/shobj-conf.
64 # If your system is not supported by that script, but includes facilities for
65 # dynamic loading of shared objects, please update the script and send the
66 # changes to bash-maintainers@gnu.org.
68 SHOBJ_CC = @SHOBJ_CC@
69 SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
70 SHOBJ_LD = @SHOBJ_LD@
71 SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
72 SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
73 SHOBJ_LIBS = @SHOBJ_LIBS@
74 SHOBJ_STATUS = @SHOBJ_STATUS@
76 INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
77 -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \
78 -I$(BUILD_DIR)/builtins $(INTL_INC)
80 .c.o:
81 $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
84 ALLPROG = print truefalse sleep pushd finfo logname basename dirname \
85 tty pathchk tee head mkdir rmdir printenv id whoami \
86 uname sync push ln unlink cut realpath getconf strftime
87 OTHERPROG = necho hello cat
89 all: $(SHOBJ_STATUS)
91 supported: $(ALLPROG)
92 others: $(OTHERPROG)
94 unsupported:
95 @echo "Your system (${host_os}) is not supported by the"
96 @echo "${topdir}/support/shobj-conf script."
97 @echo "If your operating system provides facilities for dynamic"
98 @echo "loading of shared objects using the dlopen(3) interface,"
99 @echo "please update the script and re-run configure.
100 @echo "Please send the changes you made to bash-maintainers@gnu.org"
101 @echo "for inclusion in future bash releases."
103 everything: supported others
105 print: print.o
106 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ print.o $(SHOBJ_LIBS)
108 necho: necho.o
109 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS)
111 getconf: getconf.o
112 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS)
114 hello: hello.o
115 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS)
117 truefalse: truefalse.o
118 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ truefalse.o $(SHOBJ_LIBS)
120 sleep: sleep.o
121 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS)
123 finfo: finfo.o
124 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ finfo.o $(SHOBJ_LIBS)
126 cat: cat.o
127 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS)
129 logname: logname.o
130 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ_LIBS)
132 basename: basename.o
133 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ basename.o $(SHOBJ_LIBS)
135 dirname: dirname.o
136 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dirname.o $(SHOBJ_LIBS)
138 tty: tty.o
139 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tty.o $(SHOBJ_LIBS)
141 pathchk: pathchk.o
142 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pathchk.o $(SHOBJ_LIBS)
144 tee: tee.o
145 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tee.o $(SHOBJ_LIBS)
147 mkdir: mkdir.o
148 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkdir.o $(SHOBJ_LIBS)
150 rmdir: rmdir.o
151 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rmdir.o $(SHOBJ_LIBS)
153 head: head.o
154 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ head.o $(SHOBJ_LIBS)
156 printenv: printenv.o
157 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ printenv.o $(SHOBJ_LIBS)
159 id: id.o
160 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ id.o $(SHOBJ_LIBS)
162 whoami: whoami.o
163 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ whoami.o $(SHOBJ_LIBS)
165 uname: uname.o
166 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ uname.o $(SHOBJ_LIBS)
168 sync: sync.o
169 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sync.o $(SHOBJ_LIBS)
171 push: push.o
172 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ push.o $(SHOBJ_LIBS)
174 ln: ln.o
175 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ ln.o $(SHOBJ_LIBS)
177 unlink: unlink.o
178 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS)
180 cut: cut.o
181 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
183 realpath: realpath.o
184 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS)
186 strftime: strftime.o
187 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strftime.o $(SHOBJ_LIBS)
189 # pushd is a special case. We use the same source that the builtin version
190 # uses, with special compilation options.
192 pushd.c: ${topdir}/builtins/pushd.def
193 $(RM) $@
194 ${BUILD_DIR}/builtins/mkbuiltins -D ${topdir}/builtins ${topdir}/builtins/pushd.def
196 pushd.o: pushd.c
197 $(RM) $@
198 $(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $<
200 pushd: pushd.o
201 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS)
203 clean:
204 $(RM) $(ALLPROG) $(OTHERPROG) *.o
205 -( cd perl && ${MAKE} ${MFLAGS} $@ )
207 mostlyclean: clean
208 -( cd perl && ${MAKE} ${MFLAGS} $@ )
210 distclean maintainer-clean: clean
211 $(RM) Makefile pushd.c
212 -( cd perl && ${MAKE} ${MFLAGS} $@ )
214 print.o: print.c
215 truefalse.o: truefalse.c
216 sleep.o: sleep.c
217 finfo.o: finfo.c
218 logname.o: logname.c
219 basename.o: basename.c
220 dirname.o: dirname.c
221 tty.o: tty.c
222 pathchk.o: pathchk.c
223 tee.o: tee.c
224 head.o: head.c
225 rmdir.o: rmdir.c
226 necho.o: necho.c
227 getconf.o: getconf.c
228 hello.o: hello.c
229 cat.o: cat.c
230 printenv.o: printenv.c
231 id.o: id.c
232 whoami.o: whoami.c
233 uname.o: uname.c
234 sync.o: sync.c
235 push.o: push.c
236 mkdir.o: mkdir.c
237 realpath.o: realpath.c
238 strftime.o: strftime.c