added makefile

This commit is contained in:
s492459 2025-01-07 16:08:45 +01:00
parent 9b2a43b6d4
commit 5b1cae44a4
2 changed files with 17 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
a.out
main_logging.c

16
Makefile Normal file
View File

@ -0,0 +1,16 @@
# Compiler and flags
CC = gcc
CFLAGS = -g -Wall
TARGET = a.out
SRC = main.c
# Default target: build the executable
all: $(TARGET)
# Rule to compile and link the main.c file
$(TARGET): $(SRC)
$(CC) $(CFLAGS) $(SRC) -o $(TARGET)
# Clean up build files (optional)
clean:
rm -f $(TARGET)