Files
system-programming/exercises/coreutils/ls/Makefile
Fabio Scotto di Santolo cc8ddf6ebd Write a simple UNIX ls clone
2025-09-19 17:08:57 +02:00

20 lines
290 B
Makefile

CC := gcc
CFLAGS := -Wall -Wextra -pedantic -std=c11 -pthread -g
TARGET := ls
SRC := main.c
OBJS := $(SRC:.c=.o)
.PHONY: all clean valgrind
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(TARGET) $(OBJS)