$OpenBSD$

g++ -> ${CXX}
remove hardcoded -O2, replace with CFLAGS

Index: elkhound-src/elkhound/Makefile.in
--- elkhound-src/elkhound/Makefile.in.orig
+++ elkhound-src/elkhound/Makefile.in
@@ -40,7 +40,7 @@ TRGRAMANL := ,lrtable
 
 # -------------------- compiler configuration -------------------
 # C++ compiler, etc.
-CXX := @CXX@
+CXX := ${CXX}
 
 # flags for the C and C++ compilers (and preprocessor)
 # "-Ic" is needed for binaries that use $(support-set)
@@ -156,7 +156,7 @@ support-set := \
 	    -e 's/__attribute__ ((__unused__))//' \
 	  <$*.tab.c.orig >$*.tab.c
 	rm $*.tab.c.orig
-	g++ -c -g -o $*.tab.o -O2 -DNDEBUG -Wall -I$(SMBASE) -I$(AST) $(YYDEBUG) $*.tab.c
+	${CXX} -c -g -o $*.tab.o ${CFLAGS} -DNDEBUG -Wall -I$(SMBASE) -I$(AST) $(YYDEBUG) $*.tab.c
 
 # run the trivial-grammar helper
 .PRECIOUS: %.gr %.tree.gr
