# Compiler CC = gcc # Compiler flags CFLAGS = -Wall -pedantic -ansi # Linker flags LDFLAGS = -lMLV # Target executable TARGET = game # Source files SRCS = game.c grid.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