Add template makefile, main.c

This commit is contained in:
TrainDoctor 2022-08-09 20:19:11 -07:00
commit 27bc7aa746
3 changed files with 23 additions and 0 deletions

4
.gitignore vendored
View file

@ -40,3 +40,7 @@ __pycache__/
yalc.lock yalc.lock
.vscode/settings.json .vscode/settings.json
# Ignore output folder
backend/out

14
backend/Makefile Normal file
View file

@ -0,0 +1,14 @@
# This is the default target, which will be built when
# you invoke make
.PHONY: all
all: hello
# This rule tells make how to build hello from hello.cpp
hello:
mkdir -p ./out
gcc -o ./out/hello ./src/main.c
# This rule tells make to delete hello and hello.o
.PHONY: clean
clean:
rm -f hello

5
backend/src/main.c Normal file
View file

@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
printf("Hello World\n");
return 0;
}