From 2451d08710b7af4925d4714420d25fc16a53e97c Mon Sep 17 00:00:00 2001 From: Seth Hamilton Date: Sat, 9 Aug 2025 13:43:14 -0500 Subject: [PATCH] begin makefile madness --- .gitmodules | 3 +++ genetic.h => inc/genetic.h | 0 makefile | 13 +++++++++++++ genetic.cpp => src/genetic.cpp | 1 + main.cpp => src/main.cpp | 0 5 files changed, 17 insertions(+) create mode 100644 .gitmodules rename genetic.h => inc/genetic.h (100%) create mode 100644 makefile rename genetic.cpp => src/genetic.cpp (97%) rename main.cpp => src/main.cpp (100%) diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a3b469a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ext/pthreads4w-code"] + path = ext/pthreads4w-code + url = https://git.code.sf.net/p/pthreads4w/code diff --git a/genetic.h b/inc/genetic.h similarity index 100% rename from genetic.h rename to inc/genetic.h diff --git a/makefile b/makefile new file mode 100644 index 0000000..9c2d332 --- /dev/null +++ b/makefile @@ -0,0 +1,13 @@ +src_files = $(find src -iname "*.cpp") +obj_files = $(src_files:%.cpp=%.o) + +all: $(obj_files) + echo $(obj_files) + echo $(src_files) + g++ -o main $^ + +%.o: %.cpp + g++ -o $@ $< + +clean: + rm -f *.o *.exe diff --git a/genetic.cpp b/src/genetic.cpp similarity index 97% rename from genetic.cpp rename to src/genetic.cpp index 1cb7941..f0b1ff4 100644 --- a/genetic.cpp +++ b/src/genetic.cpp @@ -1,6 +1,7 @@ #include "genetic.h" #include #include +#include namespace genetic { diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp