ls/Makefile

22 lines
513 B
Makefile
Raw Permalink Normal View History

2024-10-07 01:04:39 +00:00
CC = gcc
2024-10-21 01:27:53 +00:00
CFLAGS = -std=c99 -g -Wall -Werror -Wextra -Wformat=2 -Wjump-misses-init -Wlogical-op -Wpedantic -Wshadow
2024-10-07 01:04:39 +00:00
#CFLAGS = -ansi -g -Wall -Werror -Wextra -Wformat=2 -Wjump-misses-init -Wlogical-op -Wpedantic -Wshadow
#CFLAGS = -Wall -Werror -Wextra -Wpedantic
EXECUTABLE = ls
SOURCES = ls.c
OBJECTS = $(SOURCES:.c=.o)
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) -o $(EXECUTABLE) $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(EXECUTABLE)
.PHONY: all clean