From b4af1b2cc0b1e07134765b9e163d83264b63a13f Mon Sep 17 00:00:00 2001 From: pah arif Date: Sun, 12 Apr 2020 02:01:28 +0800 Subject: [PATCH] add makefile to support multiple C files (#1195) * tcc-based vscode project for windows Signed-off-by: misterpah * add makefile to support multiple C files --- projects/VSCode_tcc_win/.vscode/tasks.json | 5 ++++- projects/VSCode_tcc_win/Makefile | 12 ++++++++++++ projects/VSCode_tcc_win/README.md | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 projects/VSCode_tcc_win/Makefile create mode 100644 projects/VSCode_tcc_win/README.md diff --git a/projects/VSCode_tcc_win/.vscode/tasks.json b/projects/VSCode_tcc_win/.vscode/tasks.json index 4c68dd4b4..d9446fdb1 100644 --- a/projects/VSCode_tcc_win/.vscode/tasks.json +++ b/projects/VSCode_tcc_win/.vscode/tasks.json @@ -16,7 +16,10 @@ { "label": "build & run", "type": "shell", - "command": "tcc.exe ${workspaceFolder}\\${fileBasename} -o ${workspaceFolder}\\${fileBasenameNoExtension}.exe -std=c99 -Wall -lmsvcrt -lraylib -lopengl32 -lgdi32 -lkernel32 -lshell32 -luser32 -lwinmm -Wl,-subsystem=gui && ${fileBasenameNoExtension}.exe", + "command": "make.exe all workplaceFolder=${workspaceFolder} outputExe=${workspaceFolderBasename}.exe", + "args":[ + "&& ${workspaceFolderBasename}.exe", + ], "options": { "env":{ "PATH" : "C:\\raylib\\tcc\\;%PATH%" diff --git a/projects/VSCode_tcc_win/Makefile b/projects/VSCode_tcc_win/Makefile new file mode 100644 index 000000000..853052fdf --- /dev/null +++ b/projects/VSCode_tcc_win/Makefile @@ -0,0 +1,12 @@ + +MAIN_CFILE = main.c +SUPPORT_CFILES = + +#************************************************************************************************** +# raylib makefile for TCC +#************************************************************************************************** +CC = tcc +CFLAGS = -vv -std=c99 -Wall -lmsvcrt -lraylib -lopengl32 -lgdi32 -lkernel32 -lshell32 -luser32 -lwinmm -Wl,-subsystem=gui +OUTPUT = $(outputExe) +all: + $(CC) -o $(OUTPUT) $(MAIN_CFILE) $(SUPPORT_CFILES) $(CFLAGS) \ No newline at end of file diff --git a/projects/VSCode_tcc_win/README.md b/projects/VSCode_tcc_win/README.md new file mode 100644 index 000000000..c2d8fcc12 --- /dev/null +++ b/projects/VSCode_tcc_win/README.md @@ -0,0 +1,5 @@ +How to use +1. Rename Folder +2. open workspace (main.code-workspace) +3. edit Makefile to include your files +4. F5 and choose "build & run"