Update sk1/Makefile

This commit is contained in:
Yurii Chechur 2024-12-24 18:43:01 +00:00
parent 1e0bd8ebaf
commit b673ec84b1

View File

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