Overhaul build system and add support for disabling inetd support.

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>
This commit is contained in:
Joachim Nilsson
2015-03-10 10:25:46 +01:00
parent 5e31d05110
commit 8b7eb36d2a
+5 -8
View File
@@ -31,7 +31,7 @@ endif
HEADERS = lite.h
OBJS := copyfile.o dir.o fexist.o fisdir.o fmode.o rsync.o
OBJS += strlcpy.o strlcat.o strtonum.o
DEPS := $(addprefix ., $(OBJS:.o=.d))
DEPS := $(OBJS:.o=.d)
VER = 0
LIBNAME = libite
@@ -44,7 +44,6 @@ else
TARGET = $(STATICLIB) $(SOLIB)
endif
CHECK_FLAGS = $(CFLAGS) $(CPPFLAGS)
all: $(TARGET)
@@ -81,14 +80,12 @@ uninstall:
$(RM) $(DESTDIR)$(incdir)/$$file; \
done
clean: uninstall
-@$(RM) $(OBJS) $(DEPS) $(TARGET) $(VERLIB) $(STATICLIB)
clean:
-@$(RM) $(OBJS) $(DEPS) $(TARGET) $(SOLIB) $(STATICLIB)
distclean: clean
-@$(RM) $(JUNK) unittest *.o .*.d *.unittest
distclean:
-@$(RM) $(JUNK) unittest *.o *.a *.so* *.unittest
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
-include $(DEPS)
endif
endif