From e64f1a0f1eba86d074c15fe8cfb3f3db258d0c49f1ad281386f69efb22812ebe Mon Sep 17 00:00:00 2001 From: Tyler Beckman Date: Sat, 21 Sep 2024 17:20:37 -0600 Subject: [PATCH] update to template --- .class-clang-format | 2 +- Makefile | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.class-clang-format b/.class-clang-format index 432cf2e..c1015e1 100644 --- a/.class-clang-format +++ b/.class-clang-format @@ -7,7 +7,7 @@ SortIncludes: true IncludeBlocks: Regroup IncludeCategories: # System headers from C - - Regex: '<(cassert|ccomplex|cctype|cerrno|cfenv|cfloat|cinttypes|ciso646|climits|clocale|cmath|csetjmp|csignal|cstdalign|cstdarg|cstdatomic|cstdbool|cstddef|cstdint|cstdio|cstdlib|cstdnoreturn|cstring|ctgmath|cthreads|ctime|cuchar|cwchar|cwctype)>' + - Regex: '' Priority: 3 # System headers without extension. - Regex: '<([A-Za-z0-9\Q/-_\E])+>' diff --git a/Makefile b/Makefile index 5f58efc..68509bc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -TARGET = A2 -SRC_FILES = main.cpp atmFunctions.cpp +TARGET = CHANGEME +SRC_FILES = main.cpp # Tyler's custom makefile extensions for CSCI200 (anyone can use these if they want) .DEFAULT_GOAL := all # Necessary so `make` doesn't run the "pack" target, as it is declared before "all" @@ -34,6 +34,13 @@ fmt: fmtc: find . -iname '*.hpp' -o -iname '*.h' -o -iname '*.cpp' | xargs clang-format --style=file:.class-clang-format -i +## Modifies the SRC_FILES variable to have all .cpp files in the repo +setupsrc: + sed -i "0,/SRC_FILE.\{0\}S = .*/ s//SRC_FILES = $(shell find . -iname '*.cpp' -printf '%P\n')/" Makefile + +## Alias to setup SRC_FILES and then dependencies +setup: setupsrc depend + # NO EDITS NEEDED BELOW THIS LINE CXX = g++ @@ -73,5 +80,4 @@ depend: .PHONY: all clean depend # DEPENDENCIES -main.o: main.cpp atmFunctions.h -atmFunctions.o: atmFunctions.cpp +main.o: main.cpp