mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
This patch adds support for a configure script and with it
support for disabling inetd support. See the output from
./configure --help
* Add configure script
* Sprinkle #ifdef fairy dust on svc.c when inetd support is disabled
* Use GCC built-in autodep calculator (-MMD -MP)
* Fix name space issue with include files, use relative paths
* Disable username/group name to uid/gid functions in static builds
* Bug out (error) if a user tries to build the bootmisc plugin static
Possibly fixes GitHub issue #5 and issue #6.
NOTE: The static build has not received any testing at all!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
28 lines
984 B
Makefile
28 lines
984 B
Makefile
# Top directory for building complete system, fall back to this directory
|
|
ROOTDIR ?= $(TOPDIR)
|
|
|
|
# Some junk files we always want to be removed when doing a make clean.
|
|
JUNK = *~ *.bak *.map .*.d *.d DEADJOE semantic.cache *.gdb *.elf core core.*
|
|
MAKE := @$(MAKE)
|
|
MAKEFLAGS = --no-print-directory --silent
|
|
CHECK := cppcheck $(CPPFLAGS) --quiet --enable=all
|
|
INSTALL := install --backup=off
|
|
STRIPINST := $(INSTALL) -s --strip-program=$(CROSS)strip -m 0755
|
|
ARFLAGS := crus
|
|
|
|
export libdir plugindir incdir ROOTDIR CPPFLAGS LDFLAGS LDLIBS STATIC
|
|
|
|
|
|
# Override default implicit rules
|
|
%.o: %.c
|
|
@printf " CC $(subst $(ROOTDIR)/,,$(shell pwd)/$@)\n"
|
|
@$(CC) $(CFLAGS) $(CPPFLAGS) -c -MMD -MP -o $@ $<
|
|
|
|
%: %.o
|
|
@printf " LINK $(subst $(ROOTDIR)/,,$(shell pwd)/$@)\n"
|
|
@$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$@.map -o $@ $^ $(LDLIBS$(LDLIBS-$(@)))
|
|
|
|
%.so: %.o
|
|
@printf " PLUGIN $(subst $(ROOTDIR)/,,$(shell pwd)/$@)\n"
|
|
@$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|