Makefileを書いたのでここにメモしておきます。 参考にしたのはこちらのサイトです。 シンプルで応用の効くmakefileとその解説 - URIN HACK [Bash] ファイルやディレクトリの存在をチェックする方法 Makeでヘッダファイルの依存関係に対応する - wagavulinの日記 GNU make 日本語訳(Coop編) - テキスト変形関数 作成したMakefile CC = g++ CFLAGS = -g -MMD -MP LDFLAGS = LIBS = INCLUDE = -I ./include SRC_DIR = ./src OBJ_DIR = ./build SOURCES = $(shell ls $(SRC_DIR)/*.cpp) OBJS = $(subst $(SRC_DIR),$(OBJ_DIR), $(SOURCES:.cpp=.o)) TARG