diff --git a/Debug/makefile b/Debug/makefile index a25ebf8b..6d4fc22f 100644 --- a/Debug/makefile +++ b/Debug/makefile @@ -42,16 +42,30 @@ endif -include ../makefile.defs +OPTIONAL_TOOL_DEPS := \ +$(wildcard ../makefile.defs) \ +$(wildcard ../makefile.init) \ +$(wildcard ../makefile.targets) \ + + +BUILD_ARTIFACT_NAME := voxel_engine +BUILD_ARTIFACT_EXTENSION := +BUILD_ARTIFACT_PREFIX := +BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),) + # Add inputs and outputs from these tool invocations to the build variables # All Target -all: voxel_engine +all: main-build + +# Main-build Target +main-build: voxel_engine # Tool invocations -voxel_engine: $(OBJS) $(USER_OBJS) +voxel_engine: $(OBJS) $(USER_OBJS) makefile objects.mk $(OPTIONAL_TOOL_DEPS) @echo 'Building target: $@' @echo 'Invoking: Cross G++ Linker' - g++ -o "voxel_engine" $(OBJS) $(USER_OBJS) $(LIBS) + g++ -pthread -o "voxel_engine" $(OBJS) $(USER_OBJS) $(LIBS) @echo 'Finished building target: $@' @echo ' ' @@ -60,6 +74,6 @@ clean: -$(RM) $(CC_DEPS)$(C++_DEPS)$(EXECUTABLES)$(OBJS)$(C_UPPER_DEPS)$(CXX_DEPS)$(C_DEPS)$(CPP_DEPS) voxel_engine -@echo ' ' -.PHONY: all clean dependents +.PHONY: all clean dependents main-build -include ../makefile.targets diff --git a/Debug/src/files/subdir.mk b/Debug/src/files/subdir.mk index 0bdaaaf4..42a70dfe 100644 --- a/Debug/src/files/subdir.mk +++ b/Debug/src/files/subdir.mk @@ -17,10 +17,10 @@ CPP_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/files/%.o: ../src/files/%.cpp +src/files/%.o: ../src/files/%.cpp src/files/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/Debug/src/graphics/subdir.mk b/Debug/src/graphics/subdir.mk index 2fe4a7d3..35070f37 100644 --- a/Debug/src/graphics/subdir.mk +++ b/Debug/src/graphics/subdir.mk @@ -26,10 +26,10 @@ CPP_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/graphics/%.o: ../src/graphics/%.cpp +src/graphics/%.o: ../src/graphics/%.cpp src/graphics/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/Debug/src/lighting/subdir.mk b/Debug/src/lighting/subdir.mk index eb50981a..aed4c28a 100644 --- a/Debug/src/lighting/subdir.mk +++ b/Debug/src/lighting/subdir.mk @@ -20,10 +20,10 @@ CPP_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/lighting/%.o: ../src/lighting/%.cpp +src/lighting/%.o: ../src/lighting/%.cpp src/lighting/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/Debug/src/loaders/subdir.mk b/Debug/src/loaders/subdir.mk index c2345669..771a7f80 100644 --- a/Debug/src/loaders/subdir.mk +++ b/Debug/src/loaders/subdir.mk @@ -14,10 +14,10 @@ CPP_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/loaders/%.o: ../src/loaders/%.cpp +src/loaders/%.o: ../src/loaders/%.cpp src/loaders/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/Debug/src/physics/subdir.mk b/Debug/src/physics/subdir.mk index 70832091..0be00411 100644 --- a/Debug/src/physics/subdir.mk +++ b/Debug/src/physics/subdir.mk @@ -17,10 +17,10 @@ CPP_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/physics/%.o: ../src/physics/%.cpp +src/physics/%.o: ../src/physics/%.cpp src/physics/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/Debug/src/subdir.mk b/Debug/src/subdir.mk index 8ae370c6..e4dbf713 100644 --- a/Debug/src/subdir.mk +++ b/Debug/src/subdir.mk @@ -14,10 +14,10 @@ CPP_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/%.o: ../src/%.cpp +src/%.o: ../src/%.cpp src/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/Debug/src/voxels/subdir.mk b/Debug/src/voxels/subdir.mk index e5ed377e..f4dc0a33 100644 --- a/Debug/src/voxels/subdir.mk +++ b/Debug/src/voxels/subdir.mk @@ -7,6 +7,8 @@ CPP_SRCS += \ ../src/voxels/Block.cpp \ ../src/voxels/Chunk.cpp \ ../src/voxels/Chunks.cpp \ +../src/voxels/ChunksController.cpp \ +../src/voxels/ChunksLoader.cpp \ ../src/voxels/WorldGenerator.cpp \ ../src/voxels/voxel.cpp @@ -14,6 +16,8 @@ OBJS += \ ./src/voxels/Block.o \ ./src/voxels/Chunk.o \ ./src/voxels/Chunks.o \ +./src/voxels/ChunksController.o \ +./src/voxels/ChunksLoader.o \ ./src/voxels/WorldGenerator.o \ ./src/voxels/voxel.o @@ -21,15 +25,17 @@ CPP_DEPS += \ ./src/voxels/Block.d \ ./src/voxels/Chunk.d \ ./src/voxels/Chunks.d \ +./src/voxels/ChunksController.d \ +./src/voxels/ChunksLoader.d \ ./src/voxels/WorldGenerator.d \ ./src/voxels/voxel.d # Each subdirectory must supply rules for building sources it contributes -src/voxels/%.o: ../src/voxels/%.cpp +src/voxels/%.o: ../src/voxels/%.cpp src/voxels/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/Debug/src/window/subdir.mk b/Debug/src/window/subdir.mk index c8685f7a..d7e6dc9f 100644 --- a/Debug/src/window/subdir.mk +++ b/Debug/src/window/subdir.mk @@ -20,10 +20,10 @@ CPP_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/window/%.o: ../src/window/%.cpp +src/window/%.o: ../src/window/%.cpp src/window/subdir.mk @echo 'Building file: $<' @echo 'Invoking: Cross G++ Compiler' - g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" -o "$@" "$<" @echo 'Finished building: $<' @echo ' '