Files
snake2025/Makefile
2025-03-26 09:05:12 +01:00

35 lines
496 B
Makefile

# Compiler
CC = gcc
# Compiler flags
CFLAGS = -Wall -pedantic -ansi
# Linker flags
LDFLAGS = -lMLV
# Target executable
TARGET = maison
# Source files
SRCS = maison.c
# Object files
OBJS = $(SRCS:.c=.o)
# Default target
all: $(TARGET)
# Link the target executable
$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $(TARGET) $(LDFLAGS)
# Compile source files to object files
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
# Clean up build files
clean:
rm -f $(OBJS) $(TARGET)
# Phony targets
.PHONY: all clean