diff --git a/.vscode/launch.json b/.vscode/launch.json index 5d855e1..ea127f6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,24 +7,14 @@ "request": "launch", "program": "", "linux": { - "program": "make", - "args": [ - "run" - ], - "env": { - "ARCH": "linux-x86_64", - "DEBUG": "1", - }, + "preLaunchTask": "(dbg) compile linux-x86_64", + "program": "bin/linux-x86_64/${workspaceFolderBasename}", + "cwd": "bin/linux-x86_64/" }, "windows": { - "program": "make", - "args": [ - "run" - ], - "env": { - "ARCH": "win-x86_64", - "DEBUG": "1", - }, + "preLaunchTask": "(dbg) compile win-x86_64", + "program": "bin/win-x86_64/${workspaceFolderBasename}.exe", + "cwd": "bin/win-x86_64/" }, } ] diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..21aff10 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,15 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "(dbg) compile linux-x86_64", + "type": "shell", + "command": "DEBUG=1 make linux-x86_64", + }, + { + "label": "(dbg) compile win-x86_64", + "type": "shell", + "command": "DEBUG=1 make win-x86_64", + } + ] +} diff --git a/makefile b/makefile index 5bbc5f4..8926cb4 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -NAME := tetris_clone +NAME := $(shell basename $(PWD)) # compiler settings CC := clang