-------------------
Some build errors may happen depending on the options combinations or the
selected target. When facing build errors, if you know that your system is a
-bit special or particularly old, start from TARGET=generic, it is easier to
-start from there and fix the remaining issues than trying to degrade another
-target. Common issues may include:
+bit special or particularly old, start from TARGET=generic or TARGET=tiny; it
+is easier to start from there and fix the remaining issues than trying to
+degrade another target. Common issues may include:
- clock_gettime() not found
=> your system needs USE_RT=1
- haiku for Haiku
- generic for any other OS or version.
- custom to manually adjust every setting
+ - tiny to turn all default options off by default
Example:
$ make -j $(nproc) TARGET=linux-glibc
can even be disabled by setting them to an empty string or a zero. For
example :
- $ gmake TARGET=tiny USE_POLL="" USE_SLZ=0 TARGET_CFLAGS=-fomit-frame-pointer
+ $ gmake TARGET=small USE_POLL="" USE_SLZ=0 TARGET_CFLAGS=-fomit-frame-pointer
+Note that when seeking the absolute smallest build (e.g. for low-spec embedded
+devices), the "tiny" target disables everything configurable and generally
+results in a binary that's 4-5 times smaller than the default one. From this
+point it then becomes possible to enable only what is desired:
+
+ $ make -j $(nproc) TARGET=tiny USE_EPOLL=1 USE_DL=1 USE_OPENSSL=1
5.2) Adding extra CFLAGS for compiling
--------------------------------------
# following list (use the default "generic" if uncertain) :
# linux-glibc, linux-glibc-legacy, linux-musl, solaris, freebsd, freebsd-glibc,
# dragonfly, openbsd, netbsd, cygwin, haiku, aix51, aix52, aix72-gcc, osx, generic,
-# custom
+# custom, tiny
TARGET =
#### No longer used
set_target_defaults = $(call default_opts,USE_POLL USE_TPROXY)
endif
+# For embedded systems or to be used as a base, tiniest binary with fewest
+# features. Only poll() is enabled to avoid issues with select().
+ifeq ($(TARGET),tiny)
+ set_target_defaults = $(call disable_opts,$(use_opts)) $(call enable_opts,USE_POLL)
+ INSTALL = install -v
+endif
+
# Haiku
ifeq ($(TARGET),haiku)
TARGET_LDFLAGS = -lnetwork