--- a/makefile 2017-09-16 09:14:06.399502208 +0200 +++ b/makefile 2017-09-16 09:14:13.459372215 +0200 @@ -35,7 +35,7 @@ # SDL flags -SDL_FLAGS = `sdl-config --cflags` +SDL_FLAGS = $(shell sdl-config --cflags) # Debugmode stuff @@ -47,8 +47,8 @@ CFLAGS = -MMD -g3 -O3 -march=$(MARCH) -Wall -pg LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lGL -lGLU -pg else -CFLAGS = -MMD -O3 -march=$(MARCH) -Wall $(SDL_FLAGS) -LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lGL -lGLU -s +CXXFLAGS += -MMD $(SDL_FLAGS) +LDFLAGS += $(shell sdl-config --libs) -lSDL_image -lSDL_mixer -lGL -lGLU endif endif @@ -80,7 +80,7 @@ rebuild: veryclean all obj/%.o: src/%.cpp - $(CC) $(CFLAGS) $(INCLUDES) $(DIR_DEFINES) -c $< -o $@ + $(CC) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $(DIR_DEFINES) -c $< -o $@ # Compress the exe with UPX compress: $(TARGET)