mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
This patch fixes regressions in --enable-static introduced with the conversion to the GNU configure and build system. The default link flag to libtool is set to -static-libtool-libs, meaning not a fully static build -- the C library will still be used as an .so which is usually what people want -- whereas libite (-lite) and libuEv are linked statically. $ ldd /sbin/finit /sbin/initctl /sbin/finit: linux-vdso.so.1 => (0x00007ffffde62000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6979ad8000) /lib64/ld-linux-x86-64.so.2 (0x000055d893e96000) /sbin/initctl: linux-vdso.so.1 => (0x00007ffed0dd6000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feb3a29c000) /lib64/ld-linux-x86-64.so.2 (0x00005556ebd2b000) Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
69 lines
2.1 KiB
Makefile
69 lines
2.1 KiB
Makefile
ACLOCAL_AMFLAGS = -I m4
|
|
sbin_PROGRAMS = finit initctl reboot
|
|
finit_SOURCES = finit.c api.c client.c conf.c exec.c helpers.c pid.c \
|
|
sig.c svc.c service.c plugin.c tty.c cond.c cond-w.c sm.c
|
|
pkginclude_HEADERS = cond.h finit.h helpers.h inetd.h plugin.h queue.h svc.h
|
|
if INETD
|
|
finit_SOURCES += inetd.c
|
|
endif
|
|
|
|
finit_CFLAGS = -W -Wall -Wextra -std=gnu99 $(lite_CFLAGS) $(uev_CFLAGS)
|
|
finit_LDADD = $(lite_LIBS) $(uev_LIBS)
|
|
if STATIC
|
|
finit_LDADD += plugins/libplug.la
|
|
else
|
|
finit_LDADD += -ldl
|
|
endif
|
|
|
|
initctl_SOURCES = initctl.c svc.c helpers.c cond.c
|
|
initctl_CFLAGS = $(lite_CFLAGS)
|
|
initctl_LDADD = $(lite_LIBS)
|
|
|
|
reboot_SOURCES = reboot.c
|
|
|
|
SYMLINK = telinit init
|
|
SUBDIRS = plugins
|
|
doc_DATA = README.md LICENSE finit.conf services
|
|
EXTRA_DIST = README.md LICENSE ChangeLog.md finit.conf services
|
|
AM_CPPFLAGS = -U_FORTIFY_SOURCE
|
|
AM_CPPFLAGS += -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
|
|
AM_CPPFLAGS += -DFINIT_CONF=\"$(conf)\" -DFINIT_RCSD=\"$(rcsd)\" -DFINIT_FIFO=\"$(fifo)\"
|
|
|
|
if STATIC
|
|
AM_CPPFLAGS += -DENABLE_STATIC
|
|
AM_LDFLAGS = -static-libtool-libs
|
|
else
|
|
AM_CPPFLAGS += -DPLUGIN_PATH=\"$(pkglibdir)\"
|
|
AM_LDFLAGS = -export-dynamic
|
|
endif
|
|
|
|
# Compat hook
|
|
install-dev: install-pkgincludeHEADERS
|
|
|
|
# Hook in install to add finit --> telinit symlink(s)
|
|
install-exec-hook:
|
|
@for file in $(SYMLINK); do \
|
|
link=$(DESTDIR)$(sbindir)/$$file; \
|
|
test "`readlink $$link`" = "finit" && continue; \
|
|
$(LN_S) finit $$link; \
|
|
done
|
|
|
|
uninstall-hook:
|
|
@for file in $(SYMLINK); do \
|
|
$(RM) $(DESTDIR)$(sbindir)/$$file; \
|
|
done
|
|
|
|
# Target to run when building a release
|
|
release: dist
|
|
@for file in $(DIST_ARCHIVES); do \
|
|
md5sum $$file > ../$$file.md5; \
|
|
done
|
|
@mv $(DIST_ARCHIVES) ../
|
|
@echo
|
|
@echo "Resulting release files:"
|
|
@echo "================================================================="
|
|
@for file in $(DIST_ARCHIVES); do \
|
|
printf "$$file \tDistribution tarball\n"; \
|
|
printf "$$file.md5\t"; cat ../$$file.md5 | cut -f1 -d' '; \
|
|
done
|