Update build configuration and .gitignore for clean builds#26
Update build configuration and .gitignore for clean builds#26SimPleased wants to merge 1 commit into
Conversation
| *.o | ||
| *.a | ||
| main | ||
| main.exe |
There was a problem hiding this comment.
Why does removing these make it any cleaner?
This just allows the potential for people to add binaries to their fork of the repo.
|
|
||
| $(info Using ARCH = $(ARCH)) | ||
| override CFLAGS += -O3 | ||
|
|
There was a problem hiding this comment.
Don't need this format change
| UNBOUND ?= 0 | ||
| PRINT_INTERVAL ?= 256 | ||
|
|
||
|
|
There was a problem hiding this comment.
Don't need this format change
| override CXXFLAGS += -O3 -std=c++20 -I asio/asio/include -DOMISSION_LARGE_BIOMES=$(LARGE_BIOMES) -DOMISSION_UNBOUND=$(UNBOUND) -DPRINT_INTERVAL=$(PRINT_INTERVAL) | ||
| override NVCC_FLAGS += $(CXXFLAGS) --expt-relaxed-constexpr --default-stream per-thread -arch=$(ARCH) -use_fast_math | ||
| override NVCC_FLAGS += $(CXXFLAGS) --expt-relaxed-constexpr --default-stream per-thread -arch=$(ARCH) -use_fast_math | ||
|
|
There was a problem hiding this comment.
Same as above with the format changes
|
|
||
| # nvcc src/*.cpp src/*.c src/*.cu -o main.exe cubiomes/biomenoise.c cubiomes/biomes.c cubiomes/finders.c cubiomes/generator.c cubiomes/layers.c cubiomes/noise.c -arch=native -O3 -std=c++20 -I asio-1.34.2/include -DOMISSION_LARGE_BIOMES=1 --expt-relaxed-constexpr --default-stream per-thread -D_WIN32_WINNT=0x0601 | ||
| main.exe: $(SRC) $(CUBIOMES_SRC) | ||
| ifeq ($(OS),Windows_NT) |
There was a problem hiding this comment.
What's the point in moving all the build stuff for windows out of the previous windows block if you're just gonna make a new windows block to put those things in instead?
|
|
||
| cubiomes.o: src/cubiomes.c src/cubiomes.h | ||
| $(CC) -c $< -o $@ $(CFLAGS) | ||
| $(OBJ_DIR)/cubiomes.o: src/cubiomes.c src/cubiomes.h |
There was a problem hiding this comment.
None of these compile options will work on windows since they're under the else of your new conditional block.
| # Override manually with: make ARCH=sm_89 | ||
| ifndef ARCH | ||
| GPU_NAMES := $(shell nvidia-smi --query-gpu=name --format=csv,noheader) | ||
| GPU_NAMES := $(shell nvidia-smi --query-gpu=name --format=csv,noheader 2>/dev/null) |
There was a problem hiding this comment.
I don't think /dev/null is a thing on windows.
| $(info Using ARCH = $(ARCH)) | ||
| override CFLAGS += -O3 | ||
|
|
||
| override CFLAGS += -O3 -fwrapv |
There was a problem hiding this comment.
Does this do anything outside of cubiomes? We previously only applied it to cubiomes.
The makefile now will:
Compile all files using all threads rather than only using one thread.
Build files will exist in
./buildwith the object files being in./build/obj.The gitignore was modified as it no longed needed to ignore
*.a,*.o,main,main.exeas they all now exist within the./builddir.