]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
clean up build process refactor
authorClyne Sullivan <clyne@bitgloo.com>
Wed, 1 Jun 2022 01:21:23 +0000 (21:21 -0400)
committerClyne Sullivan <clyne@bitgloo.com>
Wed, 1 Jun 2022 01:21:23 +0000 (21:21 -0400)
.gitignore
Makefile
entityx/Makefile
entityx/libentityx.a
include/glm/detail/type_half.inl
include/ui_quest.hpp
lib/libentityx.a [deleted file]

index 33f78e0dd885002693c5d53d91ea188097a48bdf..fe2b2d6f7181d5fd68645c11ff8a86f1c02f4a6c 100644 (file)
@@ -1,9 +1,8 @@
+*.dat\r
+*.sw*\r
 main\r
 main.exe\r
 doc/**\r
-storyXML/*.dat\r
-xml/*.dat\r
-brice.dat\r
 config/settings.xml\r
 setup.mk\r
 TODOS\r
index ab3a6e297a22def5954461eb3f48365b95b5ea8a..6b6381d1104a90e3ea4d9d2907ce63f0620841b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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 $@
index d5c748f7f67f4debfe8907c9496cad44e7634c5b..64c55b6bd057447331b10775033630d8eaf761d9 100644 (file)
@@ -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
index 2196a18cc93054099d3ea312b205500f49c4e50d..2c8a6538a29c72ba1ea37611d129b90db9ea41f2 100644 (file)
Binary files a/entityx/libentityx.a and b/entityx/libentityx.a differ
index b9f9f0ed9723649c9d29803a2b043a973b08d527..23173d76f3bd8425456f35e4956037a9de776c1d 100644 (file)
@@ -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
index 1c478caf9ec5ce0f53c01900e9aad7ab54b203dd..ec433e66dddbf172867277f3bb59a6c7b6b39397 100644 (file)
@@ -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
deleted file mode 100644 (file)
index a91851c..0000000
Binary files a/lib/libentityx.a and /dev/null differ