Hash :
73b25a8f
Author :
Date :
2023-04-23T02:04:47
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
-I$(top_builddir) \
-isystem $(top_srcdir)/include/bsd/ \
-include $(top_builddir)/config.h \
-DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED \
-D__REENTRANT \
# EOL
if OS_WINDOWS
AM_CPPFLAGS += \
-D_CRT_SECURE_NO_WARNINGS \
-D_CRT_NONSTDC_NO_WARNINGS \
# EOL
endif
libbsd_la_included_sources = \
getentropy_aix.c \
getentropy_bsd.c \
getentropy_hpux.c \
getentropy_hurd.c \
getentropy_linux.c \
getentropy_osx.c \
getentropy_solaris.c \
getentropy_win.c \
# EOL
CLEANFILES =
EXTRA_DIST = \
libbsd.map \
libbsd.pc.in \
libbsd-ctor.pc.in \
libbsd-overlay.pc.in \
$(libbsd_la_included_sources) \
# EOL
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
libbsd.pc \
libbsd-overlay.pc \
# EOL
lib_LTLIBRARIES = libbsd.la
lib_LIBRARIES =
if BUILD_LIBBSD_CTOR
pkgconfig_DATA += libbsd-ctor.pc
lib_LIBRARIES += libbsd-ctor.a
endif
EXTRA_libbsd_la_DEPENDENCIES = \
$(libbsd_la_included_sources) \
libbsd.map \
# EOL
libbsd_la_LIBADD = \
$(MD5_LIBS) \
$(LIBBSD_LIBS) \
# EOL
libbsd_la_LDFLAGS = \
-no-undefined \
-version-number $(LIBBSD_ABI) \
# EOL
if HAVE_LINKER_VERSION_SCRIPT
libbsd_la_LDFLAGS += \
-Wl,--version-script=$(srcdir)/libbsd.map \
# EOL
else
libbsd_la_LDFLAGS += \
-export-symbols libbsd.sym \
# EOL
EXTRA_libbsd_la_DEPENDENCIES += \
libbsd.sym \
# EOL
endif
libbsd_la_SOURCES = \
closefrom.c \
dehumanize_number.c \
err.c \
expand_number.c \
explicit_bzero.c \
fgetln.c \
fgetwln.c \
flopen.c \
fmtcheck.c \
fparseln.c \
freezero.c \
getbsize.c \
getpeereid.c \
heapsort.c \
humanize_number.c \
inet_net_pton.c \
local-elf.h \
local-link.h \
merge.c \
pidfile.c \
progname.c \
pwcache.c \
radixsort.c \
readpassphrase.c \
reallocarray.c \
reallocf.c \
recallocarray.c \
setmode.c \
setproctitle.c \
stringlist.c \
strnstr.c \
strtoi.c \
strtonum.c \
strtou.c \
timeconv.c \
unvis.c \
vis.c \
# EOL
if NEED_BSD_GETOPT
libbsd_la_SOURCES += \
bsd_getopt.c \
# EOL
endif
if NEED_ARC4RANDOM
if !HAVE_GETENTROPY
libbsd_la_SOURCES += \
getentropy.c \
# EOL
endif
libbsd_la_SOURCES += \
arc4random.c \
arc4random.h \
arc4random_linux.h \
arc4random_uniform.c \
arc4random_unix.h \
arc4random_win.h \
chacha_private.h \
# EOL
endif
if NEED_MD5
libbsd_la_SOURCES += \
md5.c \
# EOL
endif
if NEED_NLIST
libbsd_la_SOURCES += \
nlist.c \
# EOL
endif
if NEED_STRL
libbsd_la_SOURCES += \
strlcat.c \
strlcpy.c \
# EOL
endif
if NEED_WCSL
libbsd_la_SOURCES += \
wcslcat.c \
wcslcpy.c \
# EOL
endif
if NEED_STRMODE
libbsd_la_SOURCES += \
strmode.c \
# EOL
endif
if NEED_FPURGE
libbsd_la_SOURCES += \
fpurge.c \
# EOL
endif
if NEED_FUNOPEN
libbsd_la_SOURCES += \
funopen.c \
# EOL
endif
if NEED_TRANSPARENT_LIBMD
CLEANFILES += \
format.ld \
# EOL
endif
DISTCLEANFILES = \
libbsd.sym \
# EOL
libbsd_ctor_a_SOURCES = \
setproctitle_ctor.c \
# EOL
# Generate a simple libtool symbol export list to be used as a fallback if
# there is no version script support.
libbsd.sym: libbsd.map
$(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9_]\{1,\}\);/\1/p' libbsd.map > $@
if NEED_TRANSPARENT_LIBMD
TRANSPARENT_LIBMD_DEPENDS = format.ld
format.ld:
$(CC) -shared -nostdlib -nostartfiles -x assembler /dev/null -o $@.so
$(OBJDUMP) -f $@.so | sed -n 's/.*file format \(.*\)/OUTPUT_FORMAT(\1)/;T;p' > $@
rm -f $@.so
endif
runtimelibdir = $(libdir)
install-exec-hook: $(TRANSPARENT_LIBMD_DEPENDS)
if [ "$(libdir)" != "$(runtimelibdir)" ]; then \
$(MKDIR_P) $(DESTDIR)$(runtimelibdir); \
mv $(DESTDIR)$(libdir)/libbsd*.so.* \
$(DESTDIR)$(runtimelibdir)/; \
fi
if NEED_TRANSPARENT_LIBMD
# The "GNU ld script" magic is required so that GNU ldconfig does not complain
# about an unknown format file.
soname=`readlink $(DESTDIR)$(libdir)/libbsd.so`; \
$(RM) $(DESTDIR)$(libdir)/libbsd.so; \
(echo '/* GNU ld script'; \
echo ' * The MD5 functions are provided by the libmd library. */'; \
cat format.ld; \
echo "GROUP($(runtimelibdir)/$$soname AS_NEEDED($(MD5_LIBS)))"; \
)>$(DESTDIR)$(libdir)/libbsd.so
else
if [ "$(libdir)" != "$(runtimelibdir)" ]; then \
soname=`readlink $(DESTDIR)$(libdir)/libbsd.so`; \
sorelprefix=`echo $(libdir) | $(SED) -r -e 's:(^/)?[^/]+:..:g'`; \
ln -sf $$sorelprefix$(runtimelibdir)/$$soname \
$(DESTDIR)$(libdir)/libbsd.so; \
fi
endif
uninstall-hook:
rm -f $(DESTDIR)$(runtimelibdir)/libbsd*.so*