From c0a2733cb3c04a81493fa3774a45e950d6a1b9be Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 7 Nov 2023 14:41:40 +0100 Subject: [PATCH] Add configuration for debugging the AES project --- HWBTutorials.code-workspace | 27 +++++++++++++++++++++++++++ aes/Makefile | 14 ++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 aes/Makefile diff --git a/HWBTutorials.code-workspace b/HWBTutorials.code-workspace index 212c642..34afaad 100644 --- a/HWBTutorials.code-workspace +++ b/HWBTutorials.code-workspace @@ -77,7 +77,34 @@ "type": "shell", "command": "${workspaceFolder:Solution Items}/scripts/delete.cmd", "problemMatcher": [] + }, + { + "label": "Build AES Project", + "type": "shell", + "command": "make", + "options": { + "cwd": "${workspaceFolder:AES}" + }, + "problemMatcher": [] } ] + }, + "launch": { + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Launch AES Project", + "program": "${workspaceFolder:AES}/bin/aes", + "args": [], + "cwd": "${workspaceFolder:AES}", + "preLaunchTask": "Build AES Project" + } + ], + "compounds": [] } } diff --git a/aes/Makefile b/aes/Makefile new file mode 100644 index 0000000..719a0da --- /dev/null +++ b/aes/Makefile @@ -0,0 +1,14 @@ +CPPFLAGS = -g + +BUILD_DIR = bin + +$(BUILD_DIR)/aes: $(BUILD_DIR)/aes.o + mkdir -p $(dir $@) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + +$(BUILD_DIR)/%.o: %.cpp + mkdir -p $(dir $@) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -rf $(BUILD_DIR)