Skip to content

Commit

Permalink
try fixiing the pthread_create issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chunyuma committed Dec 10, 2024
1 parent 3cef6df commit 22ad07f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ SRC_FILES = $(SRC_DIR)/yacht_train_core.cpp $(SRC_DIR)/utils.cpp $(SRC_DIR)/yach
# Object files
OBJ_FILES = $(SRC_FILES:.cpp=.o)

# target executable
# Target executables
TARGET1 = $(BIN_DIR)/yacht_train_core
TARGET2 = $(BIN_DIR)/yacht_run_compute_similarity

# Build rules
all: $(TARGET1) $(TARGET2)

$(TARGET1): $(OBJ_FILES)
$(CXX) $(CXXFLAGS) $(SRC_DIR)/yacht_train_core.cpp $(SRC_DIR)/utils.cpp -o $(TARGET1)
$(TARGET1): $(SRC_DIR)/yacht_train_core.cpp $(SRC_DIR)/utils.cpp
$(CXX) $(CXXFLAGS) -pthread $(SRC_DIR)/yacht_train_core.cpp $(SRC_DIR)/utils.cpp -o $(TARGET1)

$(TARGET2): $(OBJ_FILES)
$(CXX) $(CXXFLAGS) $(SRC_DIR)/yacht_run_compute_similarity.cpp $(SRC_DIR)/utils.cpp -o $(TARGET2)
$(TARGET2): $(SRC_DIR)/yacht_run_compute_similarity.cpp $(SRC_DIR)/utils.cpp
$(CXX) $(CXXFLAGS) -pthread $(SRC_DIR)/yacht_run_compute_similarity.cpp $(SRC_DIR)/utils.cpp -o $(TARGET2)

%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
$(CXX) $(CXXFLAGS) -pthread -c $< -o $@

clean:
rm -f $(OBJ_FILES) $(TARGET1) $(TARGET2)
Expand Down

0 comments on commit 22ad07f

Please sign in to comment.