Skip to content

Commit

Permalink
More changes to make
Browse files Browse the repository at this point in the history
  • Loading branch information
dchansen06 committed Dec 21, 2024
1 parent 9c02ee0 commit 384f340
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 $@
Expand Down

0 comments on commit 384f340

Please # to comment.