Skip to content

Commit

Permalink
add header files and Makefile as compilation dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-mahe committed Feb 20, 2024
1 parent cb98b1b commit 1ba6047
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ SPECIFIC := -O3 -DNDEBUG -flto

objects := $(patsubst %.cpp, %.o, $(wildcard src/*.cpp))

%.o: %.cpp
dependencies := Makefile $(wildcard src/*.h)

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

$(PROG): $(objects)
$(PROG): $(objects) $(dependencies)
$(CXX) $(CXXFLAGS) $(SPECIFIC) -o $@ $(objects) $(LIBS)

all: $(PROG)
Expand Down

0 comments on commit 1ba6047

Please sign in to comment.