File roadfighter-1.0.1269-Makefile.patch of Package roadfighter

diff -Nur roadfighter-1.0.1269/build/linux/Makefile new/build/linux/Makefile
--- roadfighter-1.0.1269/build/linux/Makefile	2008-03-19 21:58:51.000000000 +0100
+++ new/build/linux/Makefile	2016-08-08 22:16:01.610185338 +0200
@@ -36,24 +36,22 @@
 	$(SRC)/sound.o														\
 	$(SRC)/main.o
 
-CC = g++
-CFLAGS = -g3 -O3 `sdl-config --cflags` -I/usr/X11R6/include
-LDFLAGS = `sdl-config --libs` -L/usr/X11R6/lib/ -lSDL_image -lSDL_mixer -lSDL_sound -lSDL_ttf
+CXX      ?= g++
+cxxflags = $(shell pkg-config sdl SDL_image SDL_mixer --cflags) $(CXXFLAGS)
+ldflags  = $(shell pkg-config sdl SDL_image SDL_mixer --libs) -lSDL_ttf $(LDFLAGS)
 RM = rm -f
 CP = cp -r
 MD = mkdir -p
 ECHO = echo
 CHMOD = chmod
-STRIP = strip
 
 all: $(EXE)
 
 %.o: %.cpp
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CXX) -c $(cxxflags) $< -o $@
 
 $(EXE): $(OBJS)
-	$(CC) $(LDFLAGS) $^ -o $@
-	@$(STRIP) $@
+	$(CXX) $^ -o $@ $(ldflags)
 	@$(ECHO) " o If there are no errors, the game compiled succesfully"
 
 clean:
openSUSE Build Service is sponsored by