Skip to content

Commit b5af0e5

Browse files
build: add Makefile for project build configuration
1 parent ce8f92f commit b5af0e5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Compiler and compiler flags
2+
CC = gcc
3+
CFLAGS = -g -std=c11 -Wall -Wextra -Werror -Wshadow
4+
LDFLAGS = -lm
5+
6+
# Source files and executable name
7+
SRCS = filter.c helpers.c
8+
TARGET = filter
9+
10+
# Default target
11+
all: $(TARGET)
12+
13+
# Rule to link the object files into the final executable
14+
$(TARGET): $(SRCS)
15+
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
16+
17+
# Rule to clean up generated files
18+
clean:
19+
rm -f $(TARGET)

0 commit comments

Comments
 (0)