Skip to content

Commit

Permalink
Makefile header dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Min GyeongHyo committed Jul 21, 2022
1 parent 9928f6b commit efebe79
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.o
*.d
main
test
data
Expand Down
24 changes: 15 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
CXX = g++
MAIN = main
MAIN_OBJECTS = main.o graph.o parse.o stat.o basicstat.o connectstat.o biconnected.o eigencentrality.o closenesscentrality.o betweennesscentrality.o countstat.o makeplot.o html.o statanalyzer.o
TEST = test
TEST_OBJECTS = test.o graph.o parse.o diameter.o
PYPLOT_DIR = pyplot
CXXFLAGS = -std=c++17 -Wall -O3
LDFLAGS =
CXX := g++
MAIN := main
MAIN_OBJECTS := main.o graph.o parse.o stat.o basicstat.o connectstat.o biconnected.o eigencentrality.o closenesscentrality.o betweennesscentrality.o countstat.o makeplot.o html.o statanalyzer.o
TEST := test
TEST_OBJECTS := test.o graph.o parse.o diameter.o
PYPLOT_DIR := pyplot
CXXFLAGS := -std=c++17 -Wall -O3
LDFLAGS :=
MAIN_DEPS := $(MAIN_OBJECTS:.o=.d)
TEST_DEPS := $(TEST_OBJECTS:.o=.d)
CPPFLAGS := -MMD -MP

all: $(MAIN) $(TEST) $(PYPLOT_DIR)

Expand All @@ -19,4 +22,7 @@ $(PYPLOT_DIR):
mkdir -p pyplot

clean:
rm -rf $(MAIN) $(MAIN_OBJECTS) $(TEST) $(TEST_OBJECTS) *.html pyplot __pycache__
rm -rf $(MAIN) $(MAIN_OBJECTS) $(TEST) $(TEST_OBJECTS) $(MAIN_DEPS) $(TEST_DEPS) *.html pyplot __pycache__

-include $(MAIN_DEPS)
-include $(TEST_DEPS)

0 comments on commit efebe79

Please sign in to comment.