Skip to content

Commit

Permalink
Fix makefile to depend on changes in header files too
Browse files Browse the repository at this point in the history
  • Loading branch information
chinwobble committed Nov 28, 2024
1 parent a995209 commit 0ffa931
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TARGET := fastp
BIN_TARGET := ${TARGET}

CXX ?= g++
CXXFLAGS := -std=c++11 -pthread -g -O3 -I${DIR_INC} $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir)) ${CXXFLAGS}
CXXFLAGS := -std=c++11 -pthread -g -O3 -MD -MP -I${DIR_INC} $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir)) ${CXXFLAGS}
LIBS := -lisal -ldeflate -lpthread
STATIC_FLAGS := -static -Wl,--no-as-needed -pthread
LD_FLAGS := $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(LIBS) $(LD_FLAGS)
Expand All @@ -35,15 +35,11 @@ ${DIR_OBJ}/%.o:${DIR_SRC}/%.cpp
.PHONY:clean
.PHONY:static
clean:
@if test -d $(DIR_OBJ) ; \
then \
find $(DIR_OBJ) -name *.o -delete; \
fi
@if test -e $(TARGET) ; \
then \
rm $(TARGET) ; \
fi
@rm -rf $(DIR_OBJ)
@rm -f $(TARGET)

install:
install $(TARGET) $(BINDIR)/$(TARGET)
@echo "Installed."

-include $(OBJ:.o=.d)

0 comments on commit 0ffa931

Please sign in to comment.