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@
45 LOCAL_CFLAGS
= @LOCAL_CFLAGS@
47 LOCAL_DEFS
= @LOCAL_DEFS@
51 BASHINCDIR
= ${topdir}/include
53 LIBBUILD
= ${BUILD_DIR}/lib
55 INTL_LIBSRC
= ${topdir}/lib
/intl
56 INTL_BUILDDIR
= ${LIBBUILD}/intl
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.
69 SHOBJ_CFLAGS
= @SHOBJ_CFLAGS@
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
)
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
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
106 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ print.o $(SHOBJ_LIBS)
109 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS)
112 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS)
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)
121 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS)
124 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ finfo.o $(SHOBJ_LIBS)
127 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS)
130 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ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HOBJ_LIBS)
175 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ ln.o $(SHOBJ_LIBS)
178 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS)
181 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
184 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS)
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
194 ${BUILD_DIR}/builtins/mkbuiltins -D ${topdir}/builtins ${topdir}/builtins/pushd.def
198 $(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $<
201 $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS)
204 $(RM) $(ALLPROG) $(OTHERPROG) *.o
205 -( cd perl && ${MAKE} ${MFLAGS} $@ )
208 -( cd perl && ${MAKE} ${MFLAGS} $@ )
210 distclean maintainer-clean: clean
211 $(RM) Makefile pushd.c
212 -( cd perl && ${MAKE} ${MFLAGS} $@ )
215 truefalse.o: truefalse.c
219 basename.o: basename.c
230 printenv.o: printenv.c
237 realpath.o: realpath.c
238 strftime.o: strftime.c