f888b582f9
Changes included in this set: * Added strlcat() and strlcpy() from OpenBSD, always use them if the system does not have them built in. * Changed an array of PATH_MAX size allocated in the stack, to a dynamically allocated buffer from heap. This should reduce memory usage a bit. * Simplify code that implemented a homegrown realpath(3) implementation, simply use realpath(3). * If compiler supports -fstack-protector, build all code with -D_FORTIFY_SOURCE=2 and --param ssp-buffer-size=1 so that all buffers are protected.
39 lines
715 B
Makefile
39 lines
715 B
Makefile
-include config.mk
|
|
|
|
SUBDIRS = include lib bin
|
|
|
|
ifdef BUILD_API_DOCS
|
|
SUBDIRS += doc
|
|
endif
|
|
|
|
.PHONY: all
|
|
all:
|
|
@for dir in $(SUBDIRS); do \
|
|
$(MAKE) -C $$dir || exit 1; \
|
|
done
|
|
|
|
.PHONY: install
|
|
install:
|
|
@for dir in $(SUBDIRS); do \
|
|
$(MAKE) -C $$dir install || exit 1; \
|
|
done
|
|
@echo
|
|
@echo "Binaries have been installed into $(DESTDIR)$(SBINDIR)."
|
|
@echo "Librares have been installed into $(DESTDIR)$(LIBDIR)."
|
|
@echo
|
|
@echo "WARNING: Don't forget to rerun ldconfig(1)."
|
|
@echo
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
@for dir in $(SUBDIRS); do \
|
|
$(MAKE) -C $$dir uninstall || exit 1; \
|
|
done
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
@for dir in $(SUBDIRS); do \
|
|
$(MAKE) -C $$dir clean || exit 1; \
|
|
done
|
|
-rm -f config.h config.mk
|