diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b0dd8e6..b22b652 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,20 +6,23 @@ ENV LANG="C.UTF-8" RUN apt-get update \ && apt-get upgrade -y \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + vim \ make \ + cmake \ unzip \ zip \ + xxd \ build-essential \ + gdb \ + clang \ + lldb \ libsdl2-dev \ libglew-dev \ libgtk-3-dev \ - gdb \ - vim \ - cmake \ && rm -rf /var/lib/apt/lists/* \ && apt-get autoremove -y && apt-get clean -y -# Default to bash shell (other shells available at /usr/bin/fish and /usr/bin/zsh) +# Default to zsh shell ENV SHELL=/usr/bin/zsh \ DOCKER_BUILDKIT=1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 35345a7..3b48948 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -31,11 +31,11 @@ // Add the IDs of extensions you want installed when the container is created. "extensions": [ "GitHub.vscode-pull-request-github", - "ms-vscode.cpptools", "github.vscode-github-actions", "GitHub.copilot", "GitHub.copilot-chat", - "ms-vscode.makefile-tools" + "ms-vscode.cpptools-extension-pack", + "ms-vscode.hexeditor" ] } } diff --git a/platforms/shared/desktop/makefiles/Makefile.common b/platforms/shared/desktop/makefiles/Makefile.common index a17eb5c..88f26bc 100644 --- a/platforms/shared/desktop/makefiles/Makefile.common +++ b/platforms/shared/desktop/makefiles/Makefile.common @@ -12,11 +12,6 @@ define HEADER endef export HEADER -CXX = g++ -CC = gcc -#CXX = clang++ -#CC = clang - TARGET_NAME = geargrafx GIT_VERSION := "$(shell git describe --abbrev=7 --dirty --always --tags)" UNAME_S := $(shell uname -s) @@ -24,6 +19,15 @@ PLATFORM = "undefined" OBJECTS += $(SOURCES_C:.c=.o) $(SOURCES_CXX:.cpp=.o) +USE_CLANG ?= 0 +ifeq ($(USE_CLANG), 1) + CXX = clang++ + CC = clang +else + CXX = g++ + CC = gcc +endif + CPPFLAGS += -I../ -I../../ CPPFLAGS += -Wall -Wextra -Wformat -DEMULATOR_BUILD=\"$(GIT_VERSION)\" CXXFLAGS += -std=c++11