From 9f28b757e5956c26d107ebfb55e094965a85ae76 Mon Sep 17 00:00:00 2001 From: Yurii Chechur Date: Thu, 26 Dec 2024 15:59:56 +0000 Subject: [PATCH] Update sk1/Makefile --- sk1/Makefile | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sk1/Makefile b/sk1/Makefile index 5b854d8..5dc548b 100644 --- a/sk1/Makefile +++ b/sk1/Makefile @@ -1,24 +1,17 @@ +# Makefile CC = gcc -CFLAGS = -Wall -Wextra -g -SRC = main.c compressor.c +CFLAGS = -Wall -Wextra -O2 OBJ = main.o compressor.o -EXEC = compressor +TARGET = compressor -# Cieľ "all", ktorý kompiluje program -all: $(EXEC) +$(TARGET): $(OBJ) + $(CC) $(OBJ) -o $(TARGET) -# Pravidlo pre kompiláciu programu -$(EXEC): $(OBJ) - $(CC) $(OBJ) -o $(EXEC) - -# Pravidlo pre kompiláciu main.o main.o: main.c compressor.h $(CC) $(CFLAGS) -c main.c -# Pravidlo pre kompiláciu compressor.o compressor.o: compressor.c compressor.h $(CC) $(CFLAGS) -c compressor.c -# Čistiace pravidlo (vymaže skompilované súbory) clean: - rm -f $(OBJ) $(EXEC) + rm -f $(OBJ) $(TARGET)