From: Raul Cheleguini <raul.cheleguini@gmail.com>
Date: Tue, 1 Aug 2023 13:33:55 -0300
Subject: Fix Makefile clean target and build environment variables
Forwarded: no
Last-Update: 2023-07-25

---
 Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index c831d3d..ce70c48 100755
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,14 @@
-CXX      = g++
-CXXFLAGS = -Wno-multichar -O3 -D NIX
+CXX      ?= g++
+CXXFLAGS ?= -Wno-multichar -O3 -D NIX
 LD       = g++
-LDFLAGS  = -pthread
+LDFLAGS  ?= -pthread
 LIBS     = -L/usr/X11/lib -lX11 -lXi -lpulse
 OBJS     = manual.o mo3.o unmo3.o stb_vorbis.o conf.o gameover.o inter.o \
            twister.o game.o temp.o menu.o assets.o spec_dos.o spec_win.o \
            spec_nix.o spec_web.o
 
 .cpp.o:
-	$(CXX) -c $(CXXFLAGS) -o $*.o $<
+	$(CXX) $(CPPFLAGS) -c $(CXXFLAGS) -o $*.o $<
 
 all: depend asciipat
 
@@ -16,7 +16,7 @@ asciipat: $(OBJS)
 	$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
 
 clean:
-	rm -f *.o *~ depend
+	rm -f *.o *~ depend asciipat
 
 depend: Makefile
 	@echo Building dependencies...
