usaa24/sk1/Makefile

22 lines
293 B
Makefile

CC = gcc
CFLAGS = -Wall -Wextra -std=c11
SRC = main.c compressor.c
HEADERS = compressor.h
OBJ = $(SRC:.c=.o)
TARGET = compressor
all: $(TARGET)
$(TARGET): $(OBJ)
$(CC) $(CFLAGS) -o $@ $^
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJ) $(TARGET)
.PHONY: all clean