$OpenBSD: patch-makefile_common,v 1.3 2018/09/02 06:10:48 fcambus Exp $
Index: makefile.common
--- makefile.common.orig
+++ makefile.common
@@ -1,9 +1,9 @@
 # common makefile directives for linux and win32 build
 
-CC=gcc
-CXX=g++
-CFLAGS+=-O3 -Wall -Ibme -Iasm -fpermissive
-CXXFLAGS=$(CFLAGS)
+CC?=gcc
+CXX?=g++
+CFLAGS+=-Wall -Ibme -Iasm -fpermissive
+CXXFLAGS+=$(CFLAGS)
 
 EXE=	$(PREFIX)goattrk2$(SUFFIX) \
 	$(PREFIX)gt2reloc$(SUFFIX) \
@@ -43,19 +43,19 @@ bme/bme_gfx.o bme/bme_snd.o bme/bme_win.o bme/bme_mou.
 	strip $@
 	
 $(PREFIX)mod2sng$(SUFFIX): mod2sng.o bme/bme_end.o
-	gcc -o $@ $^
+	$(CC) -o $@ $^
 	strip $@
 
 $(PREFIX)ins2snd2$(SUFFIX): ins2snd2.o bme/bme_end.o
-	gcc -o $@ $^
+	$(CC) -o $@ $^
 	strip $@
 
 $(PREFIX)sngspli2$(SUFFIX): sngspli2.o bme/bme_end.o
-	gcc -o $@ $^
+	$(CC) -o $@ $^
 	strip $@
 
 $(PREFIX)betaconv$(SUFFIX): betaconv.o bme/bme_end.o
-	gcc -o $@ $^
+	$(CC) -o $@ $^
 	strip $@
 
 goattrk2.dat: player.s altplayer.s chargen.bin palette.bin cursor.bin goattrk2.bmp goattrk2.seq
