17 lines
289 B
Makefile
17 lines
289 B
Makefile
# 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)
|