2 # Makefile for the Bash library
8 BUILD_DIR = @BUILD_DIR@
10 POSIX_INC = ${topdir}/lib/posixheaders
13 INSTALL_PROGRAM = @INSTALL_PROGRAM@
14 INSTALL_DATA = @INSTALL_DATA@
27 LOCAL_CFLAGS = @LOCAL_CFLAGS@
29 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
31 PROFILE_FLAGS = @PROFILE_FLAGS@
34 LOCAL_DEFS = @LOCAL_DEFS@
36 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(POSIX_INC) -I$(srcdir)
38 CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \
42 $(CC) -c $(CCFLAGS) $<
44 # The name of the library target.
45 LIBRARY_NAME = libsh.a
47 # The C code source files for this library.
48 CSOURCES = clktck.c getcwd.c getenv.c oslib.c setlinebuf.c \
49 strcasecmp.c strerror.c strtod.c strtol.c strtoul.c \
50 vprint.c itos.c rename.c
52 # The header files for this library.
55 # The object files contained in $(LIBRARY_NAME)
56 OBJECTS = clktck.o getcwd.o getenv.o oslib.o setlinebuf.o \
57 strcasecmp.o strerror.o strtod.o strtol.o strtoul.o \
58 vprint.o itos.o rename.o
64 $(LIBRARY_NAME): $(OBJECTS)
66 $(AR) $(ARFLAGS) $@ $(OBJECTS)
67 -test -n "$(RANLIB)" && $(RANLIB) $@
71 # The rule for 'includes' is written funny so that the if statement
72 # always returns TRUE unless there really was an error installing the
77 $(RM) $(OBJECTS) $(LIBRARY_NAME)
79 realclean distclean maintainer-clean: clean
86 # rules for losing makes, like SunOS
93 setlinebuf.o: setlinebuf.c
94 strcasecmp.o: strcasecmp.c
95 strerror.o: strerror.c
101 # all files in the library depend on config.h
102 clktck.o: ${BUILD_DIR}/config.h
103 getcwd.o: ${BUILD_DIR}/config.h
104 getenv.o: ${BUILD_DIR}/config.h
105 itos.o: ${BUILD_DIR}/config.h
106 oslib.o: ${BUILD_DIR}/config.h
107 rename.o: ${BUILD_DIR}/config.h
108 setlinebuf.o: ${BUILD_DIR}/config.h
109 strcasecmp.o: ${BUILD_DIR}/config.h
110 strerror.o: ${BUILD_DIR}/config.h
111 strtod.o: ${BUILD_DIR}/config.h
112 strtol.o: ${BUILD_DIR}/config.h
113 strtoul.o: ${BUILD_DIR}/config.h
114 vprint.o: ${BUILD_DIR}/config.h
116 clktck.o: ${topdir}/bashtypes.h
118 getcwd.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${topdir}/maxpath.h
119 getcwd.o: ${POSIX_INC}/posixstat.h ${POSIX_INC}/posixdir.h
120 getcwd.o: ${POSIX_INC}/memalloc.h ${POSIX_INC}/ansi_stdlib.h
122 getenv.o: ${topdir}/bashansi.h ${topdir}/ansi_stdlib.h
123 getenv.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${topdir}/posixjmp.h
124 getenv.o: ${topdir}/command.h ${topdir}/stdc.h ${topdir}/error.h
125 getenv.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
126 getenv.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
127 getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
128 getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
129 getenv.o: ${topdir}/pathnames.h ${topdir}/externs.h
131 itos.o: ${topdir}/bashansi.h ${topdir}/ansi_stdlib.h
132 itos.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${topdir}/posixjmp.h
133 itos.o: ${topdir}/command.h ${topdir}/stdc.h ${topdir}/error.h
134 itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
135 itos.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
136 itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
137 itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
138 itos.o: ${topdir}/pathnames.h ${topdir}/externs.h
140 oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${topdir}/maxpath.h
141 oslib.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${topdir}/posixjmp.h
142 oslib.o: ${topdir}/command.h ${topdir}/stdc.h ${topdir}/error.h
143 oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
144 oslib.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
145 oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
146 oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
147 oslib.o: ${topdir}/pathnames.h ${topdir}/externs.h
148 oslib.o: ${POSIX_INC}/posixstat.h ${POSIX_INC}/filecntl.h
149 oslib.o: ${POSIX_INC}/ansi_stdlib.h
151 rename.o: ${topdir}/bashtypes.h ${topdir}/stdc.h
153 strcasecmp.o: ${topdir}/stdc.h ${topdir}/bashansi.h ${topdir}/ansi_stdlib.h
155 strerror.o: ${topdir}/bashtypes.h
156 strerror.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${topdir}/posixjmp.h
157 strerror.o: ${topdir}/command.h ${topdir}/stdc.h ${topdir}/error.h
158 strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
159 strerror.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
160 strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
161 strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
162 strerror.o: ${topdir}/pathnames.h ${topdir}/externs.h
164 strtod.o: ${topdir}/bashansi.h
165 strtod.o: ${POSIX_INC}/ansi_stdlib.h
167 strtol.o: ${topdir}/bashansi.h
168 strtol.o: ${POSIX_INC}/ansi_stdlib.h
170 strtoul.o: ${topdir}/bashansi.h
171 strtoul.o: ${POSIX_INC}/ansi_stdlib.h