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