$NetBSD: patch-Makefile,v 1.2 2019/07/03 19:02:59 nia Exp $ - add DragonFly support - add Solaris support - honor pkgsrc LDFLAGS - don't invoke git to obtain version info --- Makefile.orig 2019-06-09 11:15:40.000000000 +0000 +++ Makefile @@ -28,7 +28,7 @@ TARGET_UNIX ?= $(if $(filter UNIX,$ # ============================================================================ TYR_RELEASE := v0.62-pre -TYR_GIT := $(shell git describe --dirty 2> /dev/null) +TYR_GIT := v0.61-1226-g0ca7766-dirty TYR_VERSION := $(if $(TYR_GIT),$(TYR_GIT),$(TYR_RELEASE)) TYR_VERSION_NUM ?= $(patsubst v%,%,$(TYR_VERSION)) @@ -55,7 +55,7 @@ else ifneq (,$(findstring MINGW64,$(SYSNAME))) HOST_OS = WIN64 else -ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD)) +ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD DragonFly)) HOST_OS = UNIX HOST_UNIX = bsd else @@ -71,6 +71,12 @@ ifneq (,$(findstring $(SYSNAME),Linux)) HOST_OS = UNIX HOST_UNIX = linux else +ifneq (,$(findstring $(SYSNAME),SunOS)) +HOST_OS = UNIX +# enable this if someone can provide a cd_solaris.c with cdrom stuff +#HOST_UNIX = solaris +HOST_UNIX = null +else $(error OS type not detected.) endif endif @@ -78,6 +84,7 @@ endif endif endif endif +endif # -------------------------------------------------------------------- # Setup driver options, choosing sensible defaults based on target OS @@ -416,7 +423,7 @@ endef endif endif -git_date = $(shell git log -1 --date=short --format="%ad" -- $< 2>/dev/null) +git_date = 2019-06-09 doc_version = $(git_date) $(TYR_VERSION) quiet_cmd_man2man = ' MAN2MAN $@' @@ -989,23 +996,23 @@ ALL_QWSV_LFLAGS += $(patsubst %,-l%,$(AL # ============================================================================ $(BIN_DIR)/tyr-quake$(EXT): $(patsubst %,$(NQSWDIR)/%,$(ALL_NQSW_OBJS)) - $(call do_cc_link,$(ALL_NQSW_LFLAGS)) + $(call do_cc_link,$(ALL_NQSW_LFLAGS)) $(LDFLAGS) $(call do_strip,$@) $(BIN_DIR)/tyr-glquake$(EXT): $(patsubst %,$(NQGLDIR)/%,$(ALL_NQGL_OBJS)) - $(call do_cc_link,$(ALL_NQGL_LFLAGS)) + $(call do_cc_link,$(ALL_NQGL_LFLAGS)) $(LDFLAGS) $(call do_strip,$@) $(BIN_DIR)/tyr-qwcl$(EXT): $(patsubst %,$(QWSWDIR)/%,$(ALL_QWSW_OBJS)) - $(call do_cc_link,$(ALL_QWSW_LFLAGS)) + $(call do_cc_link,$(ALL_QWSW_LFLAGS)) $(LDFLAGS) $(call do_strip,$@) $(BIN_DIR)/tyr-glqwcl$(EXT): $(patsubst %,$(QWGLDIR)/%,$(ALL_QWGL_OBJS)) - $(call do_cc_link,$(ALL_QWGL_LFLAGS)) + $(call do_cc_link,$(ALL_QWGL_LFLAGS)) $(LDFLAGS) $(call do_strip,$@) $(BIN_DIR)/tyr-qwsv$(EXT): $(patsubst %,$(QWSVDIR)/%,$(ALL_QWSV_OBJS)) - $(call do_cc_link,$(ALL_QWSV_LFLAGS)) + $(call do_cc_link,$(ALL_QWSV_LFLAGS)) $(LDFLAGS) $(call do_strip,$@) # Build man pages, text and html docs from source