Write a simple UNIX ls clone

This commit is contained in:
Fabio Scotto di Santolo
2025-09-19 16:33:09 +02:00
parent a611ca2fc3
commit cc8ddf6ebd
3 changed files with 181 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
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)