$OpenBSD: patch-engine_hexen2_Makefile,v 1.3 2018/11/20 21:41:00 naddy Exp $

Use standard optimisations.

Index: engine/hexen2/Makefile
--- engine/hexen2/Makefile.orig
+++ engine/hexen2/Makefile
@@ -133,7 +133,7 @@ USE_CODEC_MODPLUG=no
 USE_CODEC_UMX=no
 # either timidity (preferred) or wildmidi (both possible
 # but not needed nor meaningful)
-USE_CODEC_TIMIDITY=yes
+USE_CODEC_TIMIDITY=no
 USE_CODEC_WILDMIDI=no
 # compile timidity with DLS instruments support? (no:
 # the dls code isn't good enough and isn't used in unix
@@ -194,12 +194,7 @@ endif
 # Overrides for the default CPUFLAGS
 CPUFLAGS=$(CPU_X86)
 
-CFLAGS += -g -Wall
-CFLAGS += $(CPUFLAGS)
-ifndef DEBUG
-# optimization flags
-CFLAGS += -O2 -DNDEBUG=1 -ffast-math -fomit-frame-pointer
-endif
+CFLAGS += -Wall
 
 CPPFLAGS=
 LDFLAGS =
@@ -384,6 +379,9 @@ ifeq ($(TARGET_OS),unix)
 # common unix:
 
 NASMFLAGS=-f elf -d_NO_PREFIX
+ifeq ($(USE_X86_ASM),yes)
+LDFLAGS += -Wl,-znotext
+endif
 
 ifneq ($(X11BASE),)
 INCLUDES+= -I$(X11BASE)/include
