| @@ -1,70 +1,71 @@ | | | @@ -1,70 +1,71 @@ |
1 | $NetBSD: patch-Makefile,v 1.1 2015/02/10 22:10:33 snj Exp $ | | 1 | $NetBSD: patch-Makefile,v 1.2 2019/07/03 19:02:59 nia Exp $ |
2 | | | 2 | |
3 | - add DragonFly support | | 3 | - add DragonFly support |
4 | - add Solaris support | | 4 | - add Solaris support |
5 | - honor pkgsrc LDFLAGS | | 5 | - honor pkgsrc LDFLAGS |
6 | - don't invoke git to obtain version info | | 6 | - don't invoke git to obtain version info |
7 | | | 7 | |
8 | --- Makefile.orig 2015-02-10 13:43:40.000000000 -0800 | | 8 | --- Makefile.orig 2019-06-09 11:15:40.000000000 +0000 |
9 | +++ Makefile 2015-02-10 14:00:56.000000000 -0800 | | 9 | +++ Makefile |
10 | @@ -28,7 +28,7 @@ TARGET_UNIX ?= $(if $(filter UNIX,$ | | 10 | @@ -28,7 +28,7 @@ TARGET_UNIX ?= $(if $(filter UNIX,$ |
11 | # ============================================================================ | | 11 | # ============================================================================ |
12 | | | 12 | |
13 | TYR_RELEASE := v0.62-pre | | 13 | TYR_RELEASE := v0.62-pre |
14 | -TYR_GIT := $(shell git describe --dirty 2> /dev/null) | | 14 | -TYR_GIT := $(shell git describe --dirty 2> /dev/null) |
15 | +TYR_GIT := v0.61-1226-g0ca7766-dirty | | 15 | +TYR_GIT := v0.61-1226-g0ca7766-dirty |
16 | TYR_VERSION := $(if $(TYR_GIT),$(TYR_GIT),$(TYR_RELEASE)) | | 16 | TYR_VERSION := $(if $(TYR_GIT),$(TYR_GIT),$(TYR_RELEASE)) |
17 | TYR_VERSION_NUM ?= $(patsubst v%,%,$(TYR_VERSION)) | | 17 | TYR_VERSION_NUM ?= $(patsubst v%,%,$(TYR_VERSION)) |
18 | | | 18 | |
19 | @@ -52,7 +52,7 @@ TOPDIR := $(shell pwd) | | 19 | @@ -55,7 +55,7 @@ else |
20 | ifneq (,$(findstring MINGW32,$(SYSNAME))) | | 20 | ifneq (,$(findstring MINGW64,$(SYSNAME))) |
21 | HOST_OS = WIN32 | | 21 | HOST_OS = WIN64 |
22 | else | | 22 | else |
23 | -ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD)) | | 23 | -ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD)) |
24 | +ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD DragonFly)) | | 24 | +ifneq (,$(findstring $(SYSNAME),FreeBSD NetBSD DragonFly)) |
25 | HOST_OS = UNIX | | 25 | HOST_OS = UNIX |
26 | HOST_UNIX = bsd | | 26 | HOST_UNIX = bsd |
27 | else | | 27 | else |
28 | @@ -68,12 +68,19 @@ ifneq (,$(findstring $(SYSNAME),Linux)) | | 28 | @@ -71,6 +71,12 @@ ifneq (,$(findstring $(SYSNAME),Linux)) |
29 | HOST_OS = UNIX | | 29 | HOST_OS = UNIX |
30 | HOST_UNIX = linux | | 30 | HOST_UNIX = linux |
31 | else | | 31 | else |
32 | +ifneq (,$(findstring $(SYSNAME),SunOS)) | | 32 | +ifneq (,$(findstring $(SYSNAME),SunOS)) |
33 | +HOST_OS = UNIX | | 33 | +HOST_OS = UNIX |
34 | +# enable this if someone can provide a cd_solaris.c with cdrom stuff | | 34 | +# enable this if someone can provide a cd_solaris.c with cdrom stuff |
35 | +#HOST_UNIX = solaris | | 35 | +#HOST_UNIX = solaris |
36 | +HOST_UNIX = null | | 36 | +HOST_UNIX = null |
37 | +else | | 37 | +else |
38 | $(error OS type not detected.) | | 38 | $(error OS type not detected.) |
39 | endif | | 39 | endif |
40 | endif | | 40 | endif |
| | | 41 | @@ -78,6 +84,7 @@ endif |
41 | endif | | 42 | endif |
42 | endif | | 43 | endif |
43 | endif | | 44 | endif |
44 | +endif | | 45 | +endif |
45 | | | 46 | |
46 | # -------------------------------------------------------------------- | | 47 | # -------------------------------------------------------------------- |
47 | # Setup driver options, choosing sensible defaults based on target OS | | 48 | # Setup driver options, choosing sensible defaults based on target OS |
48 | @@ -412,7 +419,7 @@ endef | | 49 | @@ -416,7 +423,7 @@ endef |
49 | endif | | 50 | endif |
50 | endif | | 51 | endif |
51 | | | 52 | |
52 | -git_date = $(shell git log -1 --date=short --format="%ad" -- $< 2>/dev/null) | | 53 | -git_date = $(shell git log -1 --date=short --format="%ad" -- $< 2>/dev/null) |
53 | +git_date = 2014-06-30 | | 54 | +git_date = 2019-06-09 |
54 | doc_version = $(git_date) $(TYR_VERSION) | | 55 | doc_version = $(git_date) $(TYR_VERSION) |
55 | | | 56 | |
56 | quiet_cmd_man2man = ' MAN2MAN $@' | | 57 | quiet_cmd_man2man = ' MAN2MAN $@' |
57 | @@ -988,23 +995,23 @@ ALL_QWSV_LFLAGS += $(patsubst %,-l%,$(AL | | 58 | @@ -989,23 +996,23 @@ ALL_QWSV_LFLAGS += $(patsubst %,-l%,$(AL |
58 | # ============================================================================ | | 59 | # ============================================================================ |
59 | | | 60 | |
60 | $(BIN_DIR)/tyr-quake$(EXT): $(patsubst %,$(NQSWDIR)/%,$(ALL_NQSW_OBJS)) | | 61 | $(BIN_DIR)/tyr-quake$(EXT): $(patsubst %,$(NQSWDIR)/%,$(ALL_NQSW_OBJS)) |
61 | - $(call do_cc_link,$(ALL_NQSW_LFLAGS)) | | 62 | - $(call do_cc_link,$(ALL_NQSW_LFLAGS)) |
62 | + $(call do_cc_link,$(ALL_NQSW_LFLAGS)) $(LDFLAGS) | | 63 | + $(call do_cc_link,$(ALL_NQSW_LFLAGS)) $(LDFLAGS) |
63 | $(call do_strip,$@) | | 64 | $(call do_strip,$@) |
64 | | | 65 | |
65 | $(BIN_DIR)/tyr-glquake$(EXT): $(patsubst %,$(NQGLDIR)/%,$(ALL_NQGL_OBJS)) | | 66 | $(BIN_DIR)/tyr-glquake$(EXT): $(patsubst %,$(NQGLDIR)/%,$(ALL_NQGL_OBJS)) |
66 | - $(call do_cc_link,$(ALL_NQGL_LFLAGS)) | | 67 | - $(call do_cc_link,$(ALL_NQGL_LFLAGS)) |
67 | + $(call do_cc_link,$(ALL_NQGL_LFLAGS)) $(LDFLAGS) | | 68 | + $(call do_cc_link,$(ALL_NQGL_LFLAGS)) $(LDFLAGS) |
68 | $(call do_strip,$@) | | 69 | $(call do_strip,$@) |
69 | | | 70 | |
70 | $(BIN_DIR)/tyr-qwcl$(EXT): $(patsubst %,$(QWSWDIR)/%,$(ALL_QWSW_OBJS)) | | 71 | $(BIN_DIR)/tyr-qwcl$(EXT): $(patsubst %,$(QWSWDIR)/%,$(ALL_QWSW_OBJS)) |