small target change for object files

This commit is contained in:
jacekpoz 2024-04-28 01:48:35 +02:00
parent 9e92f49757
commit edeb39adc2
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -14,7 +14,7 @@ PREPROCESSED = preprocessed
_PROG = HitObjectDrawable.cpp main.cpp osuparser.cpp TextureManager.cpp
PROG = $(addprefix $(SRC)/, $(_PROG))
OBJ = $(_PROG:.cpp=.o)
OBJ = $(addprefix $(BIN)/, $(_PROG:.cpp=.o))
.PHONY: all clean
@ -25,10 +25,10 @@ dirs:
mkdir -p $(PREPROCESSED)
$(NAME): $(OBJ)
$(CXX) $(addprefix $(BIN)/, $^) $(LDFLAGS) -o $(BIN)/$@
$(CXX) $^ $(LDFLAGS) -o $(BIN)/$@
%.o: $(SRC)/%.cpp
$(CXX) -c $< $(CXXFLAGS) -o $(BIN)/$@
$(BIN)/%.o: $(SRC)/%.cpp
$(CXX) -c $< $(CXXFLAGS) -o $@
clean:
rm -rf $(addprefix $(BIN)/, $(OBJ))