-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
910b9df
commit c7b0b0f
Showing
4 changed files
with
849 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
ColumnLimit: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,4 @@ Thumbs.db | |
# CMake files | ||
CMakeCache.txt | ||
CMakeFiles/ | ||
Makefile | ||
cmake_install.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ============================== | ||
# VARIABLES | ||
# ============================== | ||
|
||
# Project name | ||
PROJECT := campo_de_batalha.exe | ||
|
||
# Build directory | ||
BUILD_DIR := build | ||
|
||
# CMake generator | ||
CMAKE_GENERATOR := "MinGW Makefiles" | ||
|
||
# CMake executable | ||
CMAKE := cmake | ||
|
||
# Make executable | ||
MAKE_CMD := make | ||
|
||
# ============================== | ||
# RULES | ||
# ============================== | ||
|
||
.PHONY: all build clean | ||
|
||
# Default target | ||
all: build | ||
|
||
# Build target | ||
build: | ||
@echo "Starting build process..." | ||
@mkdir $(BUILD_DIR) 2> NUL || echo "Build directory already exists." | ||
@cd $(BUILD_DIR) && $(CMAKE) -G $(CMAKE_GENERATOR) .. && $(MAKE_CMD) --always-make | ||
|
||
# Clean target | ||
clean: | ||
@echo "Cleaning project..." | ||
@rmdir /s /q $(BUILD_DIR) 2> NUL || echo "Build directory does not exist." | ||
@if exist $(PROJECT) del /f /q $(PROJECT) | ||
|
||
# Format target for Windows | ||
format: | ||
@echo "Formatting source files..." | ||
@for /r %%f in (src\*.cpp src\*.hpp) do clang-format -i "%%f" | ||
|
||
# Phony Targets | ||
.PHONY: all build clean format |
Oops, something went wrong.