mirror of
				https://github.com/Wind4/vlmcsd.git
				synced 2025-11-04 00:52:16 +01:00 
			
		
		
		
	vlmcsd-svn1065-2016-10-12-Hotbird64
This commit is contained in:
		
							
								
								
									
										625
									
								
								GNUmakefile
									
									
									
									
									
								
							
							
						
						
									
										625
									
								
								GNUmakefile
									
									
									
									
									
								
							@@ -1,32 +1,19 @@
 | 
			
		||||
################################################################################
 | 
			
		||||
.NOTPARALLEL:
 | 
			
		||||
 | 
			
		||||
.PHONY: clean
 | 
			
		||||
MAX_THREADS ?= 16
 | 
			
		||||
 | 
			
		||||
PROGRAM_NAME ?= vlmcsd
 | 
			
		||||
CLIENT_NAME ?= vlmcs
 | 
			
		||||
MULTI_NAME ?= vlmcsdmulti
 | 
			
		||||
OBJ_NAME ?= libkms-static.o
 | 
			
		||||
A_NAME ?= libkms.a
 | 
			
		||||
CONFIG ?= config.h
 | 
			
		||||
COMPILER_LANGUAGE ?= c
 | 
			
		||||
PROGRAM_NAME ?= bin/vlmcsd
 | 
			
		||||
CLIENT_NAME ?= bin/vlmcs
 | 
			
		||||
MULTI_NAME ?= bin/vlmcsdmulti
 | 
			
		||||
OBJ_NAME ?= build/libkms-static.o
 | 
			
		||||
A_NAME ?= lib/libkms.a
 | 
			
		||||
 | 
			
		||||
# crypto library to use for standard algos, could save ~1-2kb ;)
 | 
			
		||||
# can be either 'openssl', 'polarssl' or anything other for internal impl
 | 
			
		||||
CRYPTO ?= internal
 | 
			
		||||
BASE_PROGRAM_NAME=$(notdir $(PROGRAM_NAME))
 | 
			
		||||
BASE_CLIENT_NAME=$(notdir $(CLIENT_NAME))
 | 
			
		||||
BASE_MULTI_NAME=$(notdir $(MULTI_NAME))
 | 
			
		||||
BASE_DLL_NAME=$(notdir $(DLL_NAME))
 | 
			
		||||
BASE_A_NAME=$(notdir $(A_NAME))
 | 
			
		||||
 | 
			
		||||
# use DNS_PARSER=internal if your OS doesn't supply the DNS parser routines
 | 
			
		||||
DNS_PARSER ?= OS
 | 
			
		||||
 | 
			
		||||
# You should supply your own version string here
 | 
			
		||||
 | 
			
		||||
VLMCSD_VERSION ?= $(shell test -d .svn && echo svn`svnversion`)
 | 
			
		||||
 | 
			
		||||
FEATURES ?= full
 | 
			
		||||
VERBOSE ?= NO
 | 
			
		||||
 | 
			
		||||
################################################################################
 | 
			
		||||
 | 
			
		||||
CC ?= gcc
 | 
			
		||||
TARGETPLATFORM := $(shell LANG=en_US.UTF-8 $(CC) -v 2>&1 | grep '^Target: ' | cut -f 2 -d ' ')
 | 
			
		||||
 | 
			
		||||
ifneq (,$(findstring darwin,$(TARGETPLATFORM)))
 | 
			
		||||
@@ -106,509 +93,62 @@ endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(CYGWIN),1)
 | 
			
		||||
  DLL_NAME ?= cygkms.dll
 | 
			
		||||
  DLL_NAME ?= lib/cygkms.dll
 | 
			
		||||
else ifeq ($(WIN),1)
 | 
			
		||||
  DLL_NAME ?= libkms.dll
 | 
			
		||||
  DLL_NAME ?= lib/libkms.dll
 | 
			
		||||
else ifeq ($(DARWIN),1)
 | 
			
		||||
  DLL_NAME ?= libkms.dylib
 | 
			
		||||
  DLL_NAME ?= lib/libkms.dylib
 | 
			
		||||
else
 | 
			
		||||
  DLL_NAME ?= libkms.so
 | 
			
		||||
  DLL_NAME ?= lib/libkms.so
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
BASECFLAGS = -DVLMCSD_COMPILER=\"$(notdir $(CC))\" -DVLMCSD_PLATFORM=\"$(TARGETPLATFORM)\" -DCONFIG=\"$(CONFIG)\" -DBUILD_TIME=$(shell date '+%s') -g -Os -fno-strict-aliasing -fomit-frame-pointer -ffunction-sections -fdata-sections
 | 
			
		||||
BASELDFLAGS = 
 | 
			
		||||
STRIPFLAGS =
 | 
			
		||||
CLIENTLDFLAGS =
 | 
			
		||||
SERVERLDFLAGS =
 | 
			
		||||
.DEFAULT:
 | 
			
		||||
	+@(test -d bin || mkdir bin) & (test -d lib || mkdir lib) & (test -d build || mkdir build)
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
 | 
			
		||||
 | 
			
		||||
ifndef SAFE_MODE
 | 
			
		||||
  BASECFLAGS += -fvisibility=hidden -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants
 | 
			
		||||
  
 | 
			
		||||
  ifeq ($(ELF),1)
 | 
			
		||||
    BASELDFLAGS += -Wl,-z,norelro
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
  ifneq (,$(findstring gcc,$(notdir $(CC))))
 | 
			
		||||
    BASECFLAGS += -flto
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(NOLIBS),1)
 | 
			
		||||
  NOLRESOLV=1
 | 
			
		||||
  NOLPTHREAD=1
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(NOLIBS),1)
 | 
			
		||||
  ifeq ($(MINGW),1)
 | 
			
		||||
    BASELDFLAGS += -lws2_32 -liphlpapi
 | 
			
		||||
  endif
 | 
			
		||||
endif 
 | 
			
		||||
 | 
			
		||||
ifneq ($(NO_DNS),1)
 | 
			
		||||
  ifneq ($(ANDROID),1)
 | 
			
		||||
  ifneq ($(NOLRESOLV),1)
 | 
			
		||||
 | 
			
		||||
    ifeq ($(MINGW),1)
 | 
			
		||||
      CLIENTLDFLAGS += -ldnsapi
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    ifeq ($(LINUX),1)
 | 
			
		||||
      CLIENTLDFLAGS += -lresolv
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    ifeq ($(HURD),1)
 | 
			
		||||
      CLIENTLDFLAGS += -lresolv
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    ifeq ($(DARWIN),1)
 | 
			
		||||
      CLIENTLDFLAGS += -lresolv
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    ifeq ($(CYGWIN),1)
 | 
			
		||||
      DNS_PARSER := internal
 | 
			
		||||
      CLIENTLDFLAGS += -lresolv
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    ifeq ($(OPENBSD),1)
 | 
			
		||||
      DNS_PARSER := internal
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
    ifeq ($(SOLARIS),1)
 | 
			
		||||
      CLIENTLDFLAGS += -lresolv
 | 
			
		||||
    endif
 | 
			
		||||
 | 
			
		||||
  endif
 | 
			
		||||
  endif
 | 
			
		||||
else
 | 
			
		||||
  BASECFLAGS += -DNO_DNS
 | 
			
		||||
endif 
 | 
			
		||||
 | 
			
		||||
ifneq ($(CAT),2)
 | 
			
		||||
  BASECFLAGS += "-Wall"
 | 
			
		||||
endif  
 | 
			
		||||
 | 
			
		||||
ifeq ($(DARWIN), 1)
 | 
			
		||||
  STRIPFLAGS += -Wl,-S -Wl,-x
 | 
			
		||||
  BASECFLAGS += -Wno-deprecated-declarations
 | 
			
		||||
else ifeq ($(shell uname), SunOS)
 | 
			
		||||
  STRIPFLAGS += -s
 | 
			
		||||
  ifeq ($(notdir $(LD_ALTEXEC)),gld)
 | 
			
		||||
    BASELDFLAGS += -Wl,--gc-sections
 | 
			
		||||
  endif
 | 
			
		||||
  BASELDFLAGS += -lsocket
 | 
			
		||||
else
 | 
			
		||||
  ifneq ($(CC),tcc)
 | 
			
		||||
  	BASELDFLAGS += -Wl,--gc-sections
 | 
			
		||||
  endif
 | 
			
		||||
  STRIPFLAGS += -s
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
LIBRARY_CFLAGS = -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT
 | 
			
		||||
 | 
			
		||||
ifeq ($(FEATURES), embedded)
 | 
			
		||||
  BASECFLAGS += -DNO_HELP -DNO_USER_SWITCH -DNO_BASIC_PRODUCT_LIST -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_VERBOSE_LOG -DNO_VERSION_INFORMATION
 | 
			
		||||
else ifeq ($(FEATURES), autostart)
 | 
			
		||||
  BASECFLAGS += -DNO_HELP -DNO_VERSION_INFORMATION
 | 
			
		||||
else ifeq ($(FEATURES), minimum)
 | 
			
		||||
  BASECFLAGS += -DSIMPLE_SOCKETS -DNO_TIMEOUT -DNO_SIGHUP -DNO_CL_PIDS -DNO_EXTENDED_PRODUCT_LIST -DNO_BASIC_PRODUCT_LIST -DNO_LOG -DNO_RANDOM_EPID -DNO_INI_FILE -DNO_HELP -DNO_CUSTOM_INTERVALS -DNO_PID_FILE -DNO_USER_SWITCH -DNO_VERBOSE_LOG -DNO_LIMIT -DNO_VERSION_INFORMATION -DNO_PRIVATE_IP_DETECT -DSMALL_AES
 | 
			
		||||
else ifeq ($(FEATURES), most)
 | 
			
		||||
  BASECFLAGS += -DNO_SIGHUP -DNO_PID_FILE -DNO_LIMIT
 | 
			
		||||
else ifeq ($(FEATURES), inetd)
 | 
			
		||||
  BASECFLAGS += -DNO_SIGHUP -DNO_SOCKETS -DNO_PID_FILE -DNO_LIMIT -DNO_VERSION_INFORMATION
 | 
			
		||||
else ifeq ($(FEATURES), fixedepids)
 | 
			
		||||
  BASECFLAGS += -DNO_SIGHUP -DNO_CL_PIDS -DNO_RANDOM_EPID -DNO_INI_FILE
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef INI
 | 
			
		||||
  BASECFLAGS += -DINI_FILE=\"$(INI)\"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(NO_GETIFADDRS), 1)
 | 
			
		||||
  BASECFLAGS += -DNO_GETIFADDRS
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(THREADS), 1)
 | 
			
		||||
  BASECFLAGS += -DUSE_THREADS
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(CHILD_HANDLER), 1)
 | 
			
		||||
  BASECFLAGS += -DCHILD_HANDLER
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(NO_TIMEOUT), 1)
 | 
			
		||||
  BASECFLAGS += -DNO_TIMEOUT
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef WINDOWS
 | 
			
		||||
  BASECFLAGS += -DEPID_WINDOWS=\"$(WINDOWS)\"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef OFFICE2010
 | 
			
		||||
  BASECFLAGS += -DEPID_OFFICE2010=\"$(OFFICE2010)\"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef OFFICE2013
 | 
			
		||||
  BASECFLAGS += -DEPID_OFFICE2013=\"$(OFFICE2013)\"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef OFFICE2016
 | 
			
		||||
  BASECFLAGS += -DEPID_OFFICE2016=\"$(OFFICE2016)\"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef HWID
 | 
			
		||||
  BASECFLAGS += -DHWID=$(HWID)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef TERMINAL_WIDTH
 | 
			
		||||
  BASECFLAGS += -DTERMINAL_FIXED_WIDTH=$(TERMINAL_WIDTH) -DDISPLAY_WIDTH=\"$(TERMINAL_WIDTH)\"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(NOPROCFS), 1)
 | 
			
		||||
  BASECFLAGS += -DNO_PROCFS
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(AUXV), 1)
 | 
			
		||||
  BASECFLAGS += -DUSE_AUXV
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(ANDROID), 1)
 | 
			
		||||
ifneq ($(MINIX), 1)
 | 
			
		||||
ifneq ($(NOLPTHREAD), 1)
 | 
			
		||||
 | 
			
		||||
  ifeq ($(THREADS), 1)
 | 
			
		||||
    SERVERLDFLAGS += -lpthread
 | 
			
		||||
  endif
 | 
			
		||||
  
 | 
			
		||||
  ifeq (,$(findstring NO_LIMIT,$(CFLAGS) $(BASECFLAGS)))  
 | 
			
		||||
    SERVERLDFLAGS += -lpthread
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
$(MULTI_NAME): BASECFLAGS += -DMULTI_CALL_BINARY=1
 | 
			
		||||
 | 
			
		||||
all: $(CLIENT_NAME) $(PROGRAM_NAME)
 | 
			
		||||
 | 
			
		||||
#ifdef CAT
 | 
			
		||||
  allmulti: $(CLIENT_NAME) $(PROGRAM_NAME) $(MULTI_NAME)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(strip $(VLMCSD_VERSION)),)
 | 
			
		||||
  BASECFLAGS += -DVERSION=\"$(VLMCSD_VERSION),\ built\ $(shell date -u '+%Y-%m-%d %H:%M:%S' | sed -e 's/ /\\ /g')\ UTC\" 
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef CAT
 | 
			
		||||
  BASECFLAGS += -DONE_FILE
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
SRCS = crypto.c kms.c endian.c output.c shared_globals.c helpers.c
 | 
			
		||||
HEADERS = $(CONFIG) types.h rpc.h vlmcsd.h endian.h crypto.h kms.h network.h output.h shared_globals.h vlmcs.h helpers.h
 | 
			
		||||
DEPS = $(MULTI_SRCS:.c=.d)
 | 
			
		||||
 | 
			
		||||
VLMCSD_SRCS = vlmcsd.c $(SRCS)
 | 
			
		||||
VLMCSD_OBJS = $(VLMCSD_SRCS:.c=.o)
 | 
			
		||||
 | 
			
		||||
VLMCS_SRCS = vlmcs.c $(SRCS)
 | 
			
		||||
VLMCS_OBJS = $(VLMCS_SRCS:.c=.o)
 | 
			
		||||
 | 
			
		||||
MULTI_SRCS = vlmcsd.c vlmcs.c vlmcsdmulti.c $(SRCS)
 | 
			
		||||
MULTI_OBJS = $(SRCS:.c=.o) vlmcsd-m.o vlmcs-m.o vlmcsdmulti-m.o
 | 
			
		||||
 | 
			
		||||
DLL_SRCS = libkms.c vlmcs.c $(SRCS)
 | 
			
		||||
DLL_OBJS = $(DLL_SRCS:.c=-l.o)
 | 
			
		||||
 | 
			
		||||
PDFDOCS = vlmcs.1.pdf vlmcsd.7.pdf vlmcsd.8.pdf vlmcsdmulti.1.pdf vlmcsd.ini.5.pdf vlmcsd-floppy.7.pdf
 | 
			
		||||
HTMLDOCS = $(PDFDOCS:.pdf=.html)
 | 
			
		||||
UNIXDOCS = $(PDFDOCS:.pdf=.unix.txt)
 | 
			
		||||
DOSDOCS = $(PDFDOCS:.pdf=.dos.txt)
 | 
			
		||||
 | 
			
		||||
ifneq ($(NO_DNS),1)
 | 
			
		||||
 | 
			
		||||
  VLMCS_SRCS += dns_srv.c
 | 
			
		||||
  MULTI_SRCS += dns_srv.c
 | 
			
		||||
  MULTI_OBJS += dns_srv.o
 | 
			
		||||
 | 
			
		||||
ifeq ($(DNS_PARSER),internal)
 | 
			
		||||
ifneq ($(MINGW),1)
 | 
			
		||||
  VLMCS_SRCS += ns_parse.c ns_name.c
 | 
			
		||||
  MULTI_SRCS += ns_parse.c ns_name.c
 | 
			
		||||
  MULTI_OBJS += ns_parse.o ns_name.o
 | 
			
		||||
  BASECFLAGS += "-DDNS_PARSER_INTERNAL"
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(MSRPC),1)
 | 
			
		||||
  VLMCSD_SRCS += msrpc-server.c
 | 
			
		||||
  VLMCS_SRCS += msrpc-client.c
 | 
			
		||||
  MULTI_SRCS += msrpc-server.c msrpc-client.c
 | 
			
		||||
  MULTI_OBJS += msrpc-server-m.o msrpc-client-m.o
 | 
			
		||||
  DLL_SRCS += msrpc-server.c
 | 
			
		||||
  BASECFLAGS += -DUSE_MSRPC -Wno-unknown-pragmas
 | 
			
		||||
  BASELDFLAGS += -lrpcrt4
 | 
			
		||||
else
 | 
			
		||||
  SRCS += network.c rpc.c  
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(GETIFADDRS),musl)
 | 
			
		||||
ifneq ($(NO_GETIFADDRS),1)
 | 
			
		||||
  BASECFLAGS += -DGETIFADDRS_MUSL
 | 
			
		||||
  VLMCSD_SRCS += getifaddrs-musl.c
 | 
			
		||||
  MULTI_SRCS += getifaddrs-musl.c
 | 
			
		||||
  VLMCS_SRCS += getifaddrs-musl.c
 | 
			
		||||
  DLL_SRCS += getifaddrs-musl.c
 | 
			
		||||
  MULTI_OBJS += getifaddrs-musl.o
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(ANDROID),1)
 | 
			
		||||
ifneq ($(NO_GETIFADDRS),1)
 | 
			
		||||
  VLMCSD_SRCS += ifaddrs-android.c
 | 
			
		||||
  MULTI_SRCS += ifaddrs-android.c
 | 
			
		||||
  DLL_SRCS += ifaddrs-android.c
 | 
			
		||||
  MULTI_OBJS += ifaddrs-android.o
 | 
			
		||||
endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq "$(WIN)" "1"
 | 
			
		||||
	VLMCSD_SRCS += ntservice.c
 | 
			
		||||
	MULTI_SRCS += ntservice.c
 | 
			
		||||
	MULTI_OBJS += ntservice.o
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(CRYPTO), openssl_with_aes)
 | 
			
		||||
	BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL
 | 
			
		||||
	BASELDFLAGS += -lcrypto
 | 
			
		||||
	SRCS += crypto_openssl.c
 | 
			
		||||
else ifeq ($(CRYPTO), openssl_with_aes_soft)
 | 
			
		||||
	BASECFLAGS += -D_CRYPTO_OPENSSL -D_USE_AES_FROM_OPENSSL -D_OPENSSL_SOFTWARE
 | 
			
		||||
	BASELDFLAGS += -lcrypto
 | 
			
		||||
	SRCS += crypto_openssl.c
 | 
			
		||||
else ifeq ($(CRYPTO), openssl)
 | 
			
		||||
	BASECFLAGS += -D_CRYPTO_OPENSSL
 | 
			
		||||
	BASELDFLAGS += -lcrypto
 | 
			
		||||
	SRCS += crypto_openssl.c
 | 
			
		||||
else ifeq ($(CRYPTO), polarssl)
 | 
			
		||||
	BASECFLAGS += -D_CRYPTO_POLARSSL
 | 
			
		||||
	BASELDFLAGS += -lpolarssl
 | 
			
		||||
else ifeq ($(CRYPTO), windows)
 | 
			
		||||
	BASECFLAGS += -D_CRYPTO_WINDOWS
 | 
			
		||||
	SRCS += crypto_windows.c
 | 
			
		||||
else
 | 
			
		||||
	BASECFLAGS += -D_CRYPTO_INTERNAL
 | 
			
		||||
	SRCS += crypto_internal.c
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(STRIP),0)
 | 
			
		||||
	BASELDFLAGS += $(STRIPFLAGS)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(OPENSSL_HMAC),0)
 | 
			
		||||
	BASECFLAGS += -D_OPENSSL_NO_HMAC
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(DEPENDENCIES),2)
 | 
			
		||||
    BASECFLAGS += -MMD
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(VERBOSE),3)
 | 
			
		||||
    COMPILER := $(shell printf "%-40s" $(notdir $(CC)))
 | 
			
		||||
    ARCHIVER := $(shell printf "%-40s" $(notdir $(AR)))
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ARCMD := AR
 | 
			
		||||
 | 
			
		||||
ifdef CAT
 | 
			
		||||
    LDCMD := CC/LD
 | 
			
		||||
else
 | 
			
		||||
    LDCMD := LD    
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
-include $(MULTI_SRCS:.c=.d)
 | 
			
		||||
 | 
			
		||||
%.o: %.c 
 | 
			
		||||
  ifeq ($(VERBOSE),1)
 | 
			
		||||
	$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
 | 
			
		||||
  ifeq ($(DEPENDENCIES),1)
 | 
			
		||||
	$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
 | 
			
		||||
  endif
 | 
			
		||||
  else
 | 
			
		||||
	@echo "$(COMPILER)	CC	$@ <- $<"
 | 
			
		||||
	@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -c $<
 | 
			
		||||
  ifeq ($(DEPENDENCIES),1)
 | 
			
		||||
	@echo "$(COMPILER)	DEP	$*.d <- $<"
 | 
			
		||||
	@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
 | 
			
		||||
  endif
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
%-m.o: %.c
 | 
			
		||||
  ifeq ($(VERBOSE),1)
 | 
			
		||||
	$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
 | 
			
		||||
  ifeq ($(DEPENDENCIES),1)
 | 
			
		||||
	$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
 | 
			
		||||
  endif
 | 
			
		||||
  else
 | 
			
		||||
	@echo "$(COMPILER)	CC	$@ <- $<"
 | 
			
		||||
	@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -o $@ -c $<
 | 
			
		||||
  ifeq ($(DEPENDENCIES),1)
 | 
			
		||||
	@echo "$(COMPILER)	DEP	$*.d <- $<"
 | 
			
		||||
	@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -MM -MF $*.d $<
 | 
			
		||||
  endif
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
%-l.o: %.c
 | 
			
		||||
  ifeq ($(VERBOSE),1)
 | 
			
		||||
	$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
 | 
			
		||||
  ifeq ($(DEPENDENCIES),1)
 | 
			
		||||
	$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
 | 
			
		||||
  endif
 | 
			
		||||
  else
 | 
			
		||||
	@echo "$(COMPILER)	CC	$@ <- $<"
 | 
			
		||||
	@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -o $@ -c $<
 | 
			
		||||
  ifeq ($(DEPENDENCIES),1)
 | 
			
		||||
	@echo "$(COMPILER)	DEP	$*.d <- $<"
 | 
			
		||||
	@$(CC) -x$(COMPILER_LANGUAGE) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(PLATFORMFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC -MM -MF $*.d $<
 | 
			
		||||
  endif
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ifdef CAT
 | 
			
		||||
  BUILDCOMMAND = cat $^ | $(CC) -x$(COMPILER_LANGUAGE) -o $@ -
 | 
			
		||||
  VLMCSD_PREREQUISITES = $(VLMCSD_SRCS)
 | 
			
		||||
  VLMCS_PREREQUISITES = $(VLMCS_SRCS)
 | 
			
		||||
  MULTI_PREREQUISITES = $(MULTI_SRCS)
 | 
			
		||||
  DLL_PREREQUISITES = $(DLL_SRCS)
 | 
			
		||||
  OBJ_PREREQUISITES = $(DLL_SRCS)
 | 
			
		||||
else
 | 
			
		||||
  BUILDCOMMAND = $(CC) -o $@ $^
 | 
			
		||||
  VLMCSD_PREREQUISITES = $(VLMCSD_OBJS)
 | 
			
		||||
  VLMCS_PREREQUISITES = $(VLMCS_OBJS)
 | 
			
		||||
  MULTI_PREREQUISITES = $(MULTI_OBJS)
 | 
			
		||||
  DLL_PREREQUISITES = $(DLL_OBJS)
 | 
			
		||||
  OBJ_PREREQUISITES = $(DLL_OBJS)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(VERBOSE),1)
 | 
			
		||||
  BUILDCOMMANDPREFIX = +
 | 
			
		||||
else
 | 
			
		||||
  BUILDCOMMANDPREFIX = +@
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
INFOCOMMAND = +@echo "$(COMPILER)	$(LDCMD)	$@ <- $^"
 | 
			
		||||
ARINFOCOMMAND = +@echo "$(ARCHIVER)	$(ARCMD)	$@ <. $^"
 | 
			
		||||
 | 
			
		||||
VLMCSD_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS)
 | 
			
		||||
VLMCS_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS)
 | 
			
		||||
MULTI_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(CLIENTLDFLAGS) $(SERVERLDFLAGS)
 | 
			
		||||
DLL_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -shared -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
 | 
			
		||||
OBJ_COMMAND = $(BUILDCOMMANDPREFIX)$(BUILDCOMMAND) $(PLATFORMFLAGS) $(BASECFLAGS) $(CFLAGS) $(BASELDFLAGS) $(LDFLAGS) $(SERVERLDFLAGS) -fvisibility=hidden -c -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
 | 
			
		||||
  
 | 
			
		||||
$(PROGRAM_NAME): $(VLMCSD_PREREQUISITES)
 | 
			
		||||
  ifneq ($(VERBOSE),1)
 | 
			
		||||
	$(INFOCOMMAND)
 | 
			
		||||
  endif
 | 
			
		||||
	$(VLMCSD_COMMAND)
 | 
			
		||||
 | 
			
		||||
$(CLIENT_NAME): $(VLMCS_PREREQUISITES)
 | 
			
		||||
  ifneq ($(VERBOSE),1)
 | 
			
		||||
	$(INFOCOMMAND)
 | 
			
		||||
  endif
 | 
			
		||||
	$(VLMCS_COMMAND)
 | 
			
		||||
 | 
			
		||||
$(MULTI_NAME): $(MULTI_PREREQUISITES)
 | 
			
		||||
  ifneq ($(VERBOSE),1)
 | 
			
		||||
	$(INFOCOMMAND)
 | 
			
		||||
  endif
 | 
			
		||||
	$(MULTI_COMMAND)
 | 
			
		||||
 | 
			
		||||
$(DLL_NAME): $(DLL_PREREQUISITES)
 | 
			
		||||
  ifneq ($(VERBOSE),1)
 | 
			
		||||
	$(INFOCOMMAND)
 | 
			
		||||
  endif
 | 
			
		||||
	$(DLL_COMMAND)
 | 
			
		||||
 | 
			
		||||
ifndef CAT
 | 
			
		||||
$(OBJ_NAME):
 | 
			
		||||
	+@echo Cannot make $@ without CAT defined. Please create $(A_NAME)
 | 
			
		||||
else
 | 
			
		||||
$(OBJ_NAME): $(OBJ_PREREQUISITES)
 | 
			
		||||
  ifneq ($(VERBOSE),1)
 | 
			
		||||
	$(INFOCOMMAND)
 | 
			
		||||
  endif
 | 
			
		||||
	$(OBJ_COMMAND)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef CAT
 | 
			
		||||
$(A_NAME): $(OBJ_NAME)
 | 
			
		||||
else
 | 
			
		||||
$(A_NAME): BASECFLAGS += -fvisibility=hidden -DIS_LIBRARY=1 $(LIBRARY_CFLAGS) -UNO_SOCKETS -UUSE_MSRPC
 | 
			
		||||
$(A_NAME): $(DLL_OBJS)
 | 
			
		||||
endif
 | 
			
		||||
  ifneq ($(VERBOSE),1)
 | 
			
		||||
	$(ARINFOCOMMAND)
 | 
			
		||||
  endif
 | 
			
		||||
	+@rm -f $@
 | 
			
		||||
	$(BUILDCOMMANDPREFIX)$(AR) rcs $@ $^
 | 
			
		||||
 | 
			
		||||
%.pdf : %
 | 
			
		||||
  ifeq ($(shell uname), Darwin)
 | 
			
		||||
	groff -Tps -mandoc -c $< | pstopdf -i -o $@
 | 
			
		||||
  else
 | 
			
		||||
	groff -Tpdf -mandoc -c $< > $@
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
%.html : %
 | 
			
		||||
	groff -Thtml -mandoc -c $< > $@ 
 | 
			
		||||
 | 
			
		||||
%.unix.txt : %
 | 
			
		||||
	groff -P -c -Tutf8 -mandoc -c $< | col -bx > $@
 | 
			
		||||
 | 
			
		||||
%.dos.txt : %.unix.txt
 | 
			
		||||
#	unix2dos -n $< $@
 | 
			
		||||
#	sed -e 's/$$/\r/' $< > $@
 | 
			
		||||
	awk 'sub("$$", "\r")' $< > $@
 | 
			
		||||
 | 
			
		||||
pdfdocs : $(PDFDOCS)
 | 
			
		||||
 | 
			
		||||
dosdocs : $(DOSDOCS)
 | 
			
		||||
 | 
			
		||||
unixdocs : $(UNIXDOCS)
 | 
			
		||||
 | 
			
		||||
htmldocs : $(HTMLDOCS)
 | 
			
		||||
 | 
			
		||||
alldocs : $(UNIXDOCS) $(HTMLDOCS) $(PDFDOCS) $(DOSDOCS)
 | 
			
		||||
all:
 | 
			
		||||
	+@(test -d bin || mkdir bin) & (test -d lib || mkdir lib) & (test -d build || mkdir build)
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f *.o *.d *_all.c libkms_all_*.c $(PROGRAM_NAME) $(MULTI_NAME) $(DLL_NAME) $(CLIENT_NAME) $(PDFDOCS) $(DOSDOCS) $(UNIXDOCS) $(HTMLDOCS) $(OBJ_NAME) $(A_NAME) *.a
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C src $@ FROM_PARENT=1 PROGRAM_NAME=$(PROGRAM_NAME) CLIENT_NAME=$(CLIENT_NAME) MULTI_NAME=$(MULTI_NAME) DLL_NAME=$(DLL_NAME) A_NAME=$(A_NAME)
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C man $@
 | 
			
		||||
 | 
			
		||||
dnsclean:
 | 
			
		||||
	rm -f dns_srv.o
 | 
			
		||||
alldocs:
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C man $@
 | 
			
		||||
 | 
			
		||||
dosdocs:
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C man $@
 | 
			
		||||
 | 
			
		||||
unixdocs:
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C man $@
 | 
			
		||||
 | 
			
		||||
htmldocs:
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C man $@
 | 
			
		||||
 | 
			
		||||
pdfdocs:
 | 
			
		||||
	+@$(MAKE) -j$(MAX_THREADS) -C man $@
 | 
			
		||||
 | 
			
		||||
GNUmakefile:
 | 
			
		||||
 | 
			
		||||
help:
 | 
			
		||||
	@echo "Type"
 | 
			
		||||
	@echo "    ${MAKE}          - to build $(PROGRAM_NAME) and $(CLIENT_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} clean    - to remove $(PROGRAM_NAME) and $(CLIENT_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} help     - to see this help"
 | 
			
		||||
	@echo "    ${MAKE} pdfdocs  - Create PDF versions of the documentation (Requires groff with PDF support)."
 | 
			
		||||
	@echo "    ${MAKE} htmldocs - Create HTML versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} unixdocs - Create Unix TXT versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} dosdocs  - Create DOS/Windows TXT versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} alldocs  - Create all versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} -j <x>   - Use <x> parallel tasks (SMP support) when compiling $(PROGRAM_NAME) and $(CLIENT_NAME)"
 | 
			
		||||
	@echo ""
 | 
			
		||||
	@echo "    ${MAKE} $(PROGRAM_NAME) - to build the server only."
 | 
			
		||||
	@echo "    ${MAKE} $(CLIENT_NAME) - to build the client only."
 | 
			
		||||
	@echo "    ${MAKE} $(MULTI_NAME) - to build $(PROGRAM_NAME) and $(CLIENT_NAME) in a single multi-call binary"
 | 
			
		||||
	@echo "    ${MAKE} $(DLL_NAME) - to build the shared library $(DLL_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} $(A_NAME) - to build the static library $(A_NAME)"
 | 
			
		||||
	@echo "    ${MAKE}               - to build $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} clean         - to remove all targets and temporary files"
 | 
			
		||||
	@echo "    ${MAKE} pdfdocs       - Create PDF versions of the documentation (Requires groff with PDF support)."
 | 
			
		||||
	@echo "    ${MAKE} htmldocs      - Create HTML versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} unixdocs      - Create Unix TXT versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} dosdocs       - Create DOS/Windows TXT versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} alldocs       - Create all versions of the documentation."
 | 
			
		||||
	@echo "    ${MAKE} vlmcsd        - to build KMS server $(PROGRAM_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} vlmcs         - to build KMS client $(CLIENT_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} vlmcsdmulti   - to build $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME) in a single multi-call binary $(MULTI_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} libkms        - to build the shared library $(DLL_NAME)"
 | 
			
		||||
	@echo "    ${MAKE} libkms-static - to build the static library $(A_NAME)"
 | 
			
		||||
	@echo ""
 | 
			
		||||
	@echo "Options"
 | 
			
		||||
	@echo "    CONFIG=<x>                   Compile <x> as instead of config.h."
 | 
			
		||||
	@echo "    INI=<x>                      Compile $(PROGRAM_NAME) with default ini file <x>"
 | 
			
		||||
	@echo "    INI=<x>                      Compile $(BASE_PROGRAM_NAME) with default ini file <x>"
 | 
			
		||||
	@echo "    PROGRAM_NAME=<x>             Use <x> as output file name for the KMS server. Defaults to vlmcsd."
 | 
			
		||||
	@echo "    CLIENT_NAME=<x>              Use <x> as output file name for the KMS client. Defaults to vlmcs."
 | 
			
		||||
	@echo "    MULTI_NAME=<x>               Use <x> as output file name for the multi-call binary. Defaults to vlmcsdmulti."
 | 
			
		||||
@@ -620,7 +160,7 @@ help:
 | 
			
		||||
	@echo "    CRYPTO=windows               Use Windows CryptoAPI instead of internal crypto code for SHA256/HMAC calculations."
 | 
			
		||||
	@echo "    MSRPC=1                      Use Microsoft RPC instead of vlmcsd's internal RPC. Only works with Windows and Cygwin targets."
 | 
			
		||||
	@echo "    CC=<x>                       Use compiler <x>. Supported compilers are gcc, icc, tcc and clang. Others may or may not work."
 | 
			
		||||
	@echo "    AR=<x>                       Use <x> instead of ar to build $(A_NAME). Set to gcc-ar if you want to use gcc's LTO feature."
 | 
			
		||||
	@echo "    AR=<x>                       Use <x> instead of ar to build $(BASE_A_NAME). Set to gcc-ar if you want to use gcc's LTO feature."
 | 
			
		||||
	@echo "    COMPILER_LANGUAGE=<x>        May be c or c++."
 | 
			
		||||
	@echo "    TERMINAL_WIDTH=<x>           Assume a fixed terminal width of <x> columns. Use in case of problems only."  
 | 
			
		||||
	@echo "    VLMCSD_VERSION=<x>           Sets <x> as your version identifier. Defaults to \"private build\"."
 | 
			
		||||
@@ -629,24 +169,24 @@ help:
 | 
			
		||||
	@echo "    PLATFORMFLAGS=<x>            Pass <x> as additional arguments to the compiler and the linker."
 | 
			
		||||
	@echo "    BASECFLAGS=<x>               Pass only <x> as arguments to the compiler (advanced users only)."
 | 
			
		||||
	@echo "    BASELDFLAGS=<x>              Pass only <x> as arguments to the linker (advanced users only)."
 | 
			
		||||
	@echo "    STRIP=0                      Don't strip debug information from $(PROGRAM_NAME) and $(CLIENT_NAME) (for developers)."
 | 
			
		||||
	@echo "    STRIP=0                      Don't strip debug information from $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME) (for developers)."
 | 
			
		||||
	@echo "    VERBOSE=1                    Be verbose when making targets."
 | 
			
		||||
	@echo "    VERBOSE=3                    Show name of compiler."
 | 
			
		||||
	@echo "    THREADS=1                    Use threads instead of fork(). Automatically set for native Windows. Recommended for Cygwin."
 | 
			
		||||
	@echo "    WINDOWS=<x>                  Use <x> as the default ePID for Windows (when using $(PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    OFFICE2010=<x>               Use <x> as the default ePID for Office2010 (when using $(PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    OFFICE2013=<x>               Use <x> as the default ePID for Office2013 (when using $(PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    OFFICE2016=<x>               Use <x> as the default ePID for Office2016 (when using $(PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    WINDOWS=<x>                  Use <x> as the default ePID for Windows (when using $(BASE_PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    OFFICE2010=<x>               Use <x> as the default ePID for Office2010 (when using $(BASE_PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    OFFICE2013=<x>               Use <x> as the default ePID for Office2013 (when using $(BASE_PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    OFFICE2016=<x>               Use <x> as the default ePID for Office2016 (when using $(BASE_PROGRAM_NAME) with -r 0)."
 | 
			
		||||
	@echo "    HWID=<x>                     Use <x> as the default HWID (when it can't be found in an ini file)."
 | 
			
		||||
	@echo "    FEATURES=full                Compile $(PROGRAM_NAME) with all features (default)."
 | 
			
		||||
	@echo "    FEATURES=most                Compile $(PROGRAM_NAME) without rarely used features."
 | 
			
		||||
	@echo "    FEATURES=embedded            Compile $(PROGRAM_NAME) with typical features for embedded systems."
 | 
			
		||||
	@echo "    FEATURES=autostart           Removes features typically not needed if you place $(PROGRAM_NAME) in an autostart script."
 | 
			
		||||
	@echo "    FEATURES=inetd               Compile $(PROGRAM_NAME) for running through an internet superserver only."
 | 
			
		||||
	@echo "    FEATURES=minimum             Compiles only basic features of $(PROGRAM_NAME)."
 | 
			
		||||
	@echo "    FEATURES=fixedepids          $(PROGRAM_NAME) only uses bultin internal ePIDs."
 | 
			
		||||
	@echo "    FEATURES=full                Compile $(BASE_PROGRAM_NAME) with all features (default)."
 | 
			
		||||
	@echo "    FEATURES=most                Compile $(BASE_PROGRAM_NAME) without rarely used features."
 | 
			
		||||
	@echo "    FEATURES=embedded            Compile $(BASE_PROGRAM_NAME) with typical features for embedded systems."
 | 
			
		||||
	@echo "    FEATURES=autostart           Removes features typically not needed if you place $(BASE_PROGRAM_NAME) in an autostart script."
 | 
			
		||||
	@echo "    FEATURES=inetd               Compile $(BASE_PROGRAM_NAME) for running through an internet superserver only."
 | 
			
		||||
	@echo "    FEATURES=minimum             Compiles only basic features of $(BASE_PROGRAM_NAME)."
 | 
			
		||||
	@echo "    FEATURES=fixedepids          $(BASE_PROGRAM_NAME) only uses bultin internal ePIDs."
 | 
			
		||||
	@echo ""
 | 
			
		||||
	@echo "Useful CFLAGS to save memory when running $(PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=)"
 | 
			
		||||
	@echo "Useful CFLAGS to save memory when running $(BASE_PROGRAM_NAME) on very small embedded devices (finer control than FEATURES=)"
 | 
			
		||||
	@echo "    -DNO_EXTENDED_PRODUCT_LIST   Don't compile the detailed product list."
 | 
			
		||||
	@echo "    -DNO_BASIC_PRODUCT_LIST      Don't compile the basic product list."
 | 
			
		||||
	@echo "    -DNO_VERBOSE_LOG             Don't support verbose logging. Removes -v option."
 | 
			
		||||
@@ -658,13 +198,13 @@ help:
 | 
			
		||||
	@echo "    -DNO_HELP                    Don't support command line help."
 | 
			
		||||
	@echo "    -DNO_CUSTOM_INTERVALS        Don't support custom intervals for retry and refresh activation. Removes -A and -R options."
 | 
			
		||||
	@echo "    -DNO_FREEBIND                Don't support binding to foreign IP addresses. Removes -F0 and -F1 options. Only affects FreeBSD and Linux."
 | 
			
		||||
	@echo "    -DNO_SOCKETS                 Don't support standalone operation. Requires an internet superserver to start $(PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_CL_PIDS                 Don't support specifying ePIDs and HwId from the command line in $(PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_LIMIT                   Don't support limiting concurrent clients in $(PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_SIGHUP                  Don't support SIGHUP handling in $(PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_VERSION_INFORMATION     Don't support displaying version information in $(PROGRAM_NAME) and $(CLIENT_NAME). Removes -V option."
 | 
			
		||||
	@echo "    -DNO_PRIVATE_IP_DETECT       Don't support protection against clients with public IP addresses in $(PROGRAM_NAME)"	
 | 
			
		||||
	@echo "    -DSIMPLE_SOCKETS             Compile $(PROGRAM_NAME) with basic socket support only. Removes -L option."
 | 
			
		||||
	@echo "    -DNO_SOCKETS                 Don't support standalone operation. Requires an internet superserver to start $(BASE_PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_CL_PIDS                 Don't support specifying ePIDs and HwId from the command line in $(BASE_PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_LIMIT                   Don't support limiting concurrent clients in $(BASE_PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_SIGHUP                  Don't support SIGHUP handling in $(BASE_PROGRAM_NAME)."
 | 
			
		||||
	@echo "    -DNO_VERSION_INFORMATION     Don't support displaying version information in $(BASE_PROGRAM_NAME) and $(BASE_CLIENT_NAME). Removes -V option."
 | 
			
		||||
	@echo "    -DNO_PRIVATE_IP_DETECT       Don't support protection against clients with public IP addresses in $(BASE_PROGRAM_NAME)"	
 | 
			
		||||
	@echo "    -DSIMPLE_SOCKETS             Compile $(BASE_PROGRAM_NAME) with basic socket support only. Removes -L option."
 | 
			
		||||
	@echo "    -DSMALL_AES                  Use a smaller (saves about 200 bytes) but slower implementation of AES."
 | 
			
		||||
	@echo ""
 | 
			
		||||
	@echo "Troubleshooting options"
 | 
			
		||||
@@ -677,17 +217,14 @@ help:
 | 
			
		||||
	@echo "    OPENSSL_HMAC=0               Compile for openssl versions that don't have HMAC support (required on some embedded devices)."
 | 
			
		||||
	@echo "    NO_TIMEOUT=1                 Do not set timeouts for sockets (for systems that don't support it)."
 | 
			
		||||
	@echo "    CHILD_HANDLER=1              Install a handler for SIGCHLD (for systems that don't support SA_NOCLDWAIT)."
 | 
			
		||||
	@echo "    NO_DNS=1                     Compile $(CLIENT_NAME) without support for detecting KMS servers via DNS."
 | 
			
		||||
	@echo "    NO_GETIFADDRS=1              Compile $(PROGRAM_NAME) without using getifaddrs()."
 | 
			
		||||
	@echo "    GETIFADDRS=musl              Compile $(PROGRAM_NAME) with its own implementation of getifaddrs() based on musl."
 | 
			
		||||
	@echo "    DNS_PARSER=internal          Use $(CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
 | 
			
		||||
	@echo "    NO_DNS=1                     Compile $(BASE_CLIENT_NAME) without support for detecting KMS servers via DNS."
 | 
			
		||||
	@echo "    NO_GETIFADDRS=1              Compile $(BASE_PROGRAM_NAME) without using getifaddrs()."
 | 
			
		||||
	@echo "    GETIFADDRS=musl              Compile $(BASE_PROGRAM_NAME) with its own implementation of getifaddrs() based on musl."
 | 
			
		||||
	@echo "    DNS_PARSER=internal          Use $(BASE_CLIENT_NAME) internal DNS parsing routines. No effect on MingW (native Windows)."
 | 
			
		||||
	@echo ""
 | 
			
		||||
	@echo "Other useful CFLAGS"
 | 
			
		||||
	@echo "    -DSUPPORT_WINE               Add code that the Windows version of $(PROGRAM_NAME) runs on Wine if MSRPC=1"
 | 
			
		||||
	@echo "    -DSUPPORT_WINE               Add code that the Windows version of $(BASE_PROGRAM_NAME) runs on Wine if MSRPC=1"
 | 
			
		||||
	@echo "    -D_PEDANTIC                  Report rare error/warning conditions instead of silently ignoring them."
 | 
			
		||||
	@echo "    -DINCLUDE_BETAS              Include SKU / activation IDs for obsolete beta/preview products."
 | 
			
		||||
	@echo "    -DFD_SETSIZE=<x>             Allow <x> -L statements in $(PROGRAM_NAME) (default: 64 on Windows, 1024 on most Unixes)."
 | 
			
		||||
	@echo "    -flto                        Use link time optimization. Not supported by old compilers (gcc < 4.7). Use whenever supported."
 | 
			
		||||
	@echo "    -flto=jobserver              Utilize all CPUs during link time optimization. Requires ${MAKE} -j <cpus>"
 | 
			
		||||
	@echo "    -fno-stack-protector         No stack checking. Smaller binaries."
 | 
			
		||||
	@echo "    -pipe                        Use pipes instead of temporary files (faster compilation, extends the life of your SSD)." 
 | 
			
		||||
	@echo "    -DFD_SETSIZE=<x>             Allow <x> -L statements in $(BASE_PROGRAM_NAME) (default: 64 on Windows, 1024 on most Unixes)."
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user