PICLDFLAGS = -fPIC -shared -twolevel_namespace -undefined dynamic_lookup $(LDFLAGS)
@ENDIF
-@IFNDEF D
- D=0
+@IFNDEF INSPIRCD_DEBUG
+ INSPIRCD_DEBUG=0
@ENDIF
DBGOK=0
-@IFEQ $(D) 0
+@IFEQ $(INSPIRCD_DEBUG) 0
CORECXXFLAGS += -fno-rtti -O2
@IFEQ $(COMPILER) GCC
CORECXXFLAGS += -g1
HEADER = std-header
DBGOK=1
@ENDIF
-@IFEQ $(D) 1
+@IFEQ $(INSPIRCD_DEBUG) 1
CORECXXFLAGS += -O0 -g3 -Werror -DINSPIRCD_ENABLE_RTTI
HEADER = debug-header
DBGOK=1
@ENDIF
-@IFEQ $(D) 2
+@IFEQ $(INSPIRCD_DEBUG) 2
CORECXXFLAGS += -fno-rtti -O2 -g3
HEADER = debug-header
DBGOK=1
@TARGET GNU_MAKE SOURCEPATH = $(shell /bin/pwd)
@TARGET BSD_MAKE SOURCEPATH != /bin/pwd
-@IFDEF V
+@IFDEF INSPIRCD_VERBOSE
VERBOSE = -v
@ELSE
@TARGET GNU_MAKE MAKEFLAGS += --silent
# Default target
TARGET = all
-@IFDEF M
+@IFDEF INSPIRCD_MODULE
HEADER = mod-header
FOOTER = mod-footer
- @TARGET BSD_MAKE TARGET = modules/${M:S/.so$//}.so
- @TARGET GNU_MAKE TARGET = modules/$(M:.so=).so
+ @TARGET BSD_MAKE TARGET = modules/${INSPIRCD_MODULE:S/.so$//}.so
+ @TARGET GNU_MAKE TARGET = modules/$(INSPIRCD_MODULE:.so=).so
@ENDIF
-@IFDEF T
+@IFDEF INSPIRCD_TARGET
HEADER =
FOOTER = target
- TARGET = $(T)
+ TARGET = $(INSPIRCD_TARGET)
@ENDIF
@IFEQ $(DBGOK) 0
cd $(BUILDPATH); $(MAKEENV) $(MAKE) -f real.mk $(TARGET)
debug:
- @${MAKE} D=1 all
+ @${MAKE} INSPIRCD_DEBUG=1 all
debug-header:
@echo "*************************************"
-rm -f $(BASE)/org.inspircd.plist
configureclean:
+ rm -f .gdbargs
rm -f BSDmakefile
rm -f GNUmakefile
rm -f include/config.h
- rm -f inspircd
- rm -f inspircd.1
- rm -f inspircd-genssl.1
- -rm -f inspircd.service
- -rm -f org.inspircd.plist
- -rm -f @CONFIGURE_CACHE_FILE@
+ rm -rf @CONFIGURE_DIRECTORY@
distclean: clean configureclean
-rm -rf $(SOURCEPATH)/run
@echo 'Use: ${MAKE} [flags] [targets]'
@echo ''
@echo 'Flags:'
- @echo ' V=1 Show the full command being executed instead of "BUILD: dns.cpp"'
- @echo ' D=1 Enable debug build, for module development or crash tracing'
- @echo ' D=2 Enable debug build with optimizations, for detailed backtraces'
- @echo ' DESTDIR= Specify a destination root directory (for tarball creation)'
- @echo ' -j <N> Run a parallel build using N jobs'
+ @echo ' INSPIRCD_VERBOSE=1 Show the full command being executed instead of "BUILD: dns.cpp"'
+ @echo ' INSPIRCD_DEBUG=1 Enable debug build, for module development or crash tracing'
+ @echo ' INSPIRCD_DEBUG=2 Enable debug build with optimizations, for detailed backtraces'
+ @echo ' DESTDIR= Specify a destination root directory (for tarball creation)'
+ @echo ' -j <N> Run a parallel build using N jobs'
@echo ''
@echo 'Targets:'
@echo ' all Complete build of InspIRCd, without installing (default)'
@echo ' Currently installs to ${BASE}'
@echo ' debug Compile a debug build. Equivalent to "make D=1 all"'
@echo ''
- @echo ' M=m_foo Builds a single module (cmd_foo also works here)'
- @echo ' T=target Builds a user-specified target, such as "inspircd" or "modules"'
- @echo ' Other targets are specified by their path in the build directory'
- @echo ' Multiple targets may be separated by a space'
+ @echo ' INSPIRCD_MODULE=m_foo Builds a single module (core_foo also works here)'
+ @echo ' INSPIRCD_TARGET=target Builds a user-specified target, such as "inspircd" or "modules"'
+ @echo ' Other targets are specified by their path in the build directory'
+ @echo ' Multiple targets may be separated by a space'
@echo ''
@echo ' clean Cleans object files produced by the compile'
@echo ' distclean Cleans all generated files (build, configure, run, etc)'