diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2022-05-31 21:21:23 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2022-05-31 21:21:23 -0400 |
commit | 23f14a87adac16acf9ee8bc1df2e6cd025ef86e3 (patch) | |
tree | 72405f1f2a7add43edb10bc03fb8931d22be63d3 | |
parent | 75d919eee490fa28827c5a453aca196496c57d4b (diff) |
clean up build processrefactor
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | Makefile | 37 | ||||
-rw-r--r-- | entityx/Makefile | 4 | ||||
-rw-r--r-- | entityx/libentityx.a | bin | 549286 -> 572196 bytes | |||
-rw-r--r-- | include/glm/detail/type_half.inl | 3 | ||||
-rw-r--r-- | include/ui_quest.hpp | 2 | ||||
-rw-r--r-- | lib/libentityx.a | bin | 562752 -> 0 bytes |
7 files changed, 23 insertions, 28 deletions
@@ -1,9 +1,8 @@ +*.dat
+*.sw*
main
main.exe
doc/**
-storyXML/*.dat
-xml/*.dat
-brice.dat
config/settings.xml
setup.mk
TODOS
@@ -4,50 +4,47 @@ CC = gcc CXX = g++ ifeq ($(TARGET_OS),linux) - LIBS = -Llib -lgif -llua5.3 -lentityx -lpthread -lGL -lGLEW -lfreetype \ + LIBS = -Lentityx -lgif -llua5.3 -lentityx -lpthread -lGL -lGLEW -lfreetype \ -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2main endif ifeq ($(TARGET_OS),win32) - LIBS = -Llib -lgif -llua -lentityx -lopengl32 -lglew32 -lmingw32 \ + LIBS = -Lentityx -lgif -llua -lentityx -lopengl32 -lglew32 -lmingw32 \ -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -lfreetype endif -CXXFLAGS = -ggdb -m$(TARGET_BITS) -std=c++17 -fext-numeric-literals -CXXINC = -Iinclude -Iinclude/freetype -I. -CXXWARN = -Wall -Wextra -Werror -pedantic +CXXFLAGS = -O0 -g3 -ggdb -m$(TARGET_BITS) -std=c++20 \ + -Wall -Wextra -Werror -pedantic \ + -I. -Iinclude -Iinclude/freetype CXXSRCDIR = src CXXOUTDIR = out CXXSRC = $(wildcard $(CXXSRCDIR)/*.cpp) \ $(wildcard $(CXXSRCDIR)/systems/*.cpp) \ $(wildcard $(CXXSRCDIR)/components/*.cpp) -CXXOBJ = $(patsubst $(CXXSRCDIR)/%.cpp, $(CXXOUTDIR)/%.o, $(CXXSRC)) \ - $(patsubst $(CXXSRCDIR)/systems/%.cpp, $(CXXOUTDIR)/systems/%.o, $(CXXSRC)) \ - $(patsubst $(CXXSRCDIR)/components/%.cpp, $(CXXOUTDIR)/components/%.o, $(CXXSRC)) +CXXOBJ = $(patsubst $(CXXSRCDIR)/%.cpp, $(CXXOUTDIR)/%.o, \ + $(patsubst $(CXXSRCDIR)/systems/%.cpp, $(CXXOUTDIR)/systems/%.o, \ + $(patsubst $(CXXSRCDIR)/components/%.cpp, $(CXXOUTDIR)/components/%.o, $(CXXSRC)))) EXEC = main -all: SPECIAL:=-ggdb game - -game: $(EXEC) +all: $(EXEC) clean: @echo " CLEAN" @rm -f $(EXEC) @rm -rf out - @mkdir out - @mkdir out/systems - @mkdir out/components @rm -f xml/*.dat -$(EXEC): $(CXXOUTDIR)/$(CXXOBJ) +$(EXEC): $(CXXOUTDIR) $(CXXOBJ) @echo " CXX/LD main" - @$(CXX) $(SPECIAL) $(CXXFLAGS) $(CXXINC) $(CXXWARN) -o $(EXEC) out/components/*.o out/systems/*.o out/*.o $(LIBS) + @$(CXX) $(CXXFLAGS) -o $(EXEC) $(CXXOBJ) $(LIBS) + +$(CXXOUTDIR): + @mkdir out + @mkdir out/systems + @mkdir out/components $(CXXOUTDIR)/%.o: $(CXXSRCDIR)/%.cpp @echo " CXX " $< - @$(CXX) $(CXXFLAGS) $(CXXINC) $(CXXWARN) $(LIBS) -c $< -o $@ + @$(CXX) $(CXXFLAGS) -c $< -o $@ -$(CXXOUTDIR)/%.o: $(CXXSRCDIR)/%.cc - @echo " CXX " $< - @$(CXX) $(CXXFLAGS) $(CXXINC) $(CXXWARN) $(LIBS) -c $< -o $@ diff --git a/entityx/Makefile b/entityx/Makefile index d5c748f..64c55b6 100644 --- a/entityx/Makefile +++ b/entityx/Makefile @@ -1,5 +1,3 @@ -# gamedev CHANGE - changed output of libentityx to ../lib/ - INC = -I.. FLG = -std=gnu++11 @@ -15,6 +13,6 @@ all: g++ $(INC) $(FLG) -c Event.cc -o out/Event.o g++ $(INC) $(FLG) -c Entity.cc -o out/Entity.o g++ $(INC) $(FLG) -c System.cc -o out/System.o - ar rvs ../lib/libentityx.a out/*.o + ar rvs libentityx.a out/*.o # g++ out/*.o -shared -o ../entityx.so rm -rf out diff --git a/entityx/libentityx.a b/entityx/libentityx.a Binary files differindex 2196a18..2c8a653 100644 --- a/entityx/libentityx.a +++ b/entityx/libentityx.a diff --git a/include/glm/detail/type_half.inl b/include/glm/detail/type_half.inl index b9f9f0e..23173d7 100644 --- a/include/glm/detail/type_half.inl +++ b/include/glm/detail/type_half.inl @@ -39,7 +39,8 @@ namespace detail { GLM_FUNC_QUALIFIER float overflow() { - volatile float f = 1e10; + // tcsullivan: Remove volatile for C++20 + /*volatile*/ float f = 1e10; for(int i = 0; i < 10; ++i) f *= f; // this will overflow before the for loop terminates diff --git a/include/ui_quest.hpp b/include/ui_quest.hpp index 1c478ca..ec433e6 100644 --- a/include/ui_quest.hpp +++ b/include/ui_quest.hpp @@ -42,7 +42,7 @@ namespace ui { const auto& titles = QuestSystem::getQuestTitles(); auto y = top_y - 100; const auto x = offset.x - 180; - for (const auto t : titles) { + for (const auto& t : titles) { UISystem::putString(vec2(x, y), t); y -= 20; //ui::putText(x + 40, y, q.desc.c_str()); diff --git a/lib/libentityx.a b/lib/libentityx.a Binary files differdeleted file mode 100644 index a91851c..0000000 --- a/lib/libentityx.a +++ /dev/null |