From 7e99f4b204d4983235185168388cdc8e20cc5ccd Mon Sep 17 00:00:00 2001 From: Oshgnacknak Date: Wed, 29 Dec 2021 13:51:22 +0100 Subject: [PATCH] Add sub module and source directory --- .gitmodules | 3 +++ Makefile | 8 +++++--- osh.h | 1 + hophop.cpp => src/hophop.cpp | 0 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 osh.h rename hophop.cpp => src/hophop.cpp (100%) diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a865dae --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "osh.h"] + path = osh.h + url = https://github.com/Oshgnacknak/osh.h diff --git a/Makefile b/Makefile index 6dd3d3e..9f03de1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ LIBS=glfw3 glew -CPPFLAGS=-Wall -Wextra $(shell pkg-config --cflags $(LIBS)) -ggdb -std=c++20 +CPPFLAGS=-Wall -Wextra $(shell pkg-config --cflags $(LIBS)) -ggdb -std=c++20 -Iosh.h LDLIBS=$(shell pkg-config --libs $(LIBS)) -lm -hophop: hophop.cpp - $(CXX) hophop.cpp -o hophop $(CPPFLAGS) $(LDLIBS) +CPP=$(wildcard src/*.cpp) + +hophop: $(CPP) + $(CXX) $^ -o hophop $(CPPFLAGS) $(LDLIBS) diff --git a/osh.h b/osh.h new file mode 160000 index 0000000..7743f77 --- /dev/null +++ b/osh.h @@ -0,0 +1 @@ +Subproject commit 7743f77dfec8a722cbeba6aa6b87aa3e4a3903f1 diff --git a/hophop.cpp b/src/hophop.cpp similarity index 100% rename from hophop.cpp rename to src/hophop.cpp