21 lines
513 B
Makefile
21 lines
513 B
Makefile
CC = gcc
|
|
CFLAGS = -std=c99 -g -Wall -Werror -Wextra -Wformat=2 -Wjump-misses-init -Wlogical-op -Wpedantic -Wshadow
|
|
#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
|