From b673ec84b16d2ef6128d36434c14df5f27c72779 Mon Sep 17 00:00:00 2001 From: Yurii Chechur Date: Tue, 24 Dec 2024 18:43:01 +0000 Subject: [PATCH] Update sk1/Makefile --- sk1/Makefile | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/sk1/Makefile b/sk1/Makefile index e11572a..6dfae63 100644 --- a/sk1/Makefile +++ b/sk1/Makefile @@ -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