Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dchansen06 committed Dec 19, 2024
1 parent f6a5397 commit 031ed96
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ CXXFLAGS = -Wall -Wextra
LDLIBS = $(shell sdl2-config --libs) $(shell sdl2-config --libs)_mixer

SRC_DIR = src
CLIENT_SRC := $(wildcard $(SRC_DIR)/client*.cpp)
SERVER_SRC := $(wildcard $(SRC_DIR)/server*.cpp)
CLIENT_SRC = $(wildcard $(SRC_DIR)/client*.cpp)
SERVER_SRC = $(wildcard $(SRC_DIR)/server*.cpp)

# Heavily inspired by https://stackoverflow.com/a/30602701
BUILD_DIR = build
BIN_DIR = $(BUILD_DIR)/bin
OBJ_DIR = $(BUILD_DIR)/obj
CLIENT_OBJ := $(CLIENT_SRC:$(SRC_DIR)/%.cpp=$(OBJ_DIR)/%.o)
SERVER_OBJ := $(SERVER_SRC:$(SRC_DIR)/%.cpp=$(OBJ_DIR)/%.o)

PROGRAM = $(BIN_DIR)/client $(BIN_DIR)/server
OBJ_DIR = $(BUILD_DIR)/obj
CLIENT_OBJ = $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(CLIENT_SRC))
SERVER_OBJ = $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(SERVER_SRC))

.DELETE_ON_ERROR:
.PHONY: all clean
Expand Down

0 comments on commit 031ed96

Please # to comment.