From 384f340130d5f2ba3013bd283c623a6b6ac8c2a3 Mon Sep 17 00:00:00 2001 From: dchansen06 Date: Fri, 20 Dec 2024 21:26:46 -0800 Subject: [PATCH] More changes to make --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c8ac1c8..a2436bf 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ # CXXFLAGS = -Wall -Wextra -LDLIBS = $(shell sdl2-config --libs --cflags) $(shell sdl2-config --libs --cflags)_mixer $(shell pkg-config gtkmm-4.0 --libs --cflags) +LDLIBS = $(shell sdl2-config --libs) $(shell sdl2-config --libs)_mixer $(shell pkg-config gtkmm-4.0 --libs) +LDFLAGS = $(shell sdl2-config --cflags) $(shell pkg-config gtkmm-4.0 --cflags) SRC_DIR = src SERVER_SRC = $(wildcard $(SRC_DIR)/server*.cpp) @@ -26,16 +27,16 @@ GUI_OBJ = $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(GUI_SRC)) all: $(PROGRAM) $(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp | Makefile $(OBJ_DIR) - $(CXX) $(CXXFLAGS) -c $(^) $(LDLIBS) -o $(@) + $(CXX) $(CXXFLAGS) -c $(^) $(LDLIBS) $(LDFLAGS) -o $(@) $(BIN_DIR)/server: $(SERVER_OBJ) | $(BIN_DIR) - $(CXX) $(CXXFLAGS) $(^) $(LDLIBS) -o $(@) + $(CXX) $(CXXFLAGS) $(^) $(LDLIBS) $(LDFLAGS) -o $(@) $(BIN_DIR)/client: $(CLIENT_OBJ) | $(BIN_DIR) - $(CXX) $(CXXFLAGS) $(^) -o $(@) + $(CXX) $(CXXFLAGS) $(^) $(LDLIBS) $(LDFLAGS) -o $(@) $(BIN_DIR)/gui: $(GUI_OBJ) | $(BIN_DIR) - $(CXX) $(CXXFLAGS) $(^) $(LDLIBS) -o $(@) + $(CXX) $(CXXFLAGS) $(^) $(LDLIBS) $(LDFLAGS) -o $(@) $(BIN_DIR) $(OBJ_DIR): mkdir -p $@