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)
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.
23 exec_prefix = @
exec_prefix@
27 includedir = @
includedir@
30 BUILD_DIR
= @BUILD_DIR@
42 host_vendor
= @host_vendor@
47 # These values are generated for configure by ${topdir}/support/shobj-conf.
48 # If your system is not supported by that script, but includes facilities for
49 # dynamic loading of shared objects, please update the script and send the
50 # changes to bash-maintainers@gnu.org.
53 SHOBJ_CFLAGS
= @SHOBJ_CFLAGS@
55 SHOBJ_LDFLAGS
= @SHOBJ_LDFLAGS@
56 SHOBJ_XLDFLAGS
= @SHOBJ_XLDFLAGS@
57 SHOBJ_LIBS
= @SHOBJ_LIBS@
58 SHOBJ_STATUS
= @SHOBJ_STATUS@
60 INC
= -I.
-I..
-I
$(topdir
) -I
$(topdir
)/lib
-I
$(topdir
)/builtins \
61 -I
$(topdir
)/include -I
$(BUILD_DIR
) -I
$(BUILD_DIR
)/lib \
62 -I
$(BUILD_DIR
)/builtins
65 $(SHOBJ_CC
) $(SHOBJ_CFLAGS
) $(CFLAGS
) $(INC
) -c
-o
$@
$<
68 ALLPROG
= print truefalse sleep pushd finfo logname
basename dirname \
69 tty pathchk tee head mkdir rmdir sprintf printenv id whoami \
70 uname sync push ln unlink cut realpath
71 OTHERPROG
= necho getconf hello cat
79 @echo
"Your system (${host_os}) is not supported by the"
80 @echo
"${topdir}/support/shobj-conf script."
81 @echo
"If your operating system provides facilities for dynamic"
82 @echo
"loading of shared objects using the dlopen(3) interface,"
83 @echo
"please update the script and re-run configure.
84 @echo "Please send the changes you made to bash-maintainers@gnu.org
"
85 @echo "for inclusion in future bash releases.
"
87 everything: supported others
90 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sprintf.o $(SHOBJ_LIBS)
93 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ print.o $(SHOBJ_LIBS)
96 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS)
99 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS)
102 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS)
104 truefalse: truefalse.o
105 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ truefalse.o $(SHOBJ_LIBS)
108 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS)
111 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ finfo.o $(SHOBJ_LIBS)
114 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS)
117 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ_LIBS)
120 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ basename.o $(SHOBJ_LIBS)
123 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dirname.o $(SHOBJ_LIBS)
126 $(SHOBJ_LD) $(SHOBJ_LD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_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
171 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS)
173 # pushd is a special case. We use the same source that the builtin version
174 # uses, with special compilation options.
176 pushd.c: ${topdir}/builtins/pushd.def
178 ${BUILD_DIR}/builtins/mkbuiltins -D ${topdir}/builtins ${topdir}/builtins/pushd.def
182 $(SHOBJ_CC) -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ $<
185 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS)
188 $(RM) $(ALLPROG) $(OTHERPROG) *.o
189 -( cd perl && ${MAKE} ${MFLAGS} $@ )
192 -( cd perl && ${MAKE} ${MFLAGS} $@ )
194 distclean maintainer-clean: clean
195 $(RM) Makefile pushd.c
196 -( cd perl && ${MAKE} ${MFLAGS} $@ )
199 truefalse.o: truefalse.c
203 basename.o: basename.c
215 printenv.o: printenv.c
222 realpath.o: realpath.c