Skip to content

Commit

Permalink
Makefile: PYHEADERS only for Params.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoys authored Aug 11, 2023
1 parent ee6690a commit a9a0289
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,16 @@ $(BUILD_DIR)/%.pyh: %.py
$(Q) $(PYTHONEXE) scripts/compile_tools/hexdump.py "$<" "$@"

# Calculate dependencies
$(BUILD_DIR)/%.d: $(PYHEADERS) %.cpp
@echo "Checking dependencies for $*.cpp"
$(BUILD_DIR)/%.d: %.cpp
@echo "Checking dependencies for $<"
$(Q) if [ ! -d "$(@D)" ]; then mkdir -p "$(@D)"; fi;
$(Q) $(SMILEICXX) $(CXXFLAGS) -MF"$@" -MM -MP -MT"$@ $(@:.d=.o)" $*.cpp
$(Q) $(SMILEICXX) $(CXXFLAGS) -MF"$@" -MM -MP -MT"$@ $(@:.d=.o)" $<

# Calculate dependencies: special for Params.cpp which needs pyh files
$(BUILD_DIR)/src/Params/Params.d: src/Params/Params.cpp $(PYHEADERS)
@echo "Checking dependencies for $<"
$(Q) if [ ! -d "$(@D)" ]; then mkdir -p "$(@D)"; fi;
$(Q) $(SMILEICXX) $(CXXFLAGS) -MF"$@" -MM -MP -MT"$@ $(@:.d=.o)" $<

ifeq ($(findstring icpc, $(COMPILER_INFO)), icpc)

Expand Down

0 comments on commit a9a0289

Please sign in to comment.