From 90efb1c3f38187f7b43704eca3eee47998725435 Mon Sep 17 00:00:00 2001 From: Yevhen Kozirovskyi Date: Sun, 26 Jan 2025 19:24:28 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20sk1/Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sk1/Makefile | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/sk1/Makefile b/sk1/Makefile index feaffbe..4bd6985 100644 --- a/sk1/Makefile +++ b/sk1/Makefile @@ -1,33 +1,16 @@ -# Compiler and flags CC = gcc -CFLAGS = -Wall -Wextra -std=c11 +CFLAGS = -Wall -Wextra -std=c99 -# Targets -TARGET = compressor +all: compressor -# Source files -SRCS = main.c compressor.c +compressor: main.o compressor.o + $(CC) $(CFLAGS) -o compressor main.o compressor.o -# Object files -OBJS = $(SRCS:.c=.o) +main.o: main.c compressor.h + $(CC) $(CFLAGS) -c main.c -# Header files -DEPS = compressor.h +compressor.o: compressor.c compressor.h + $(CC) $(CFLAGS) -c compressor.c -# Default rule -all: $(TARGET) - -# Linking the executable -$(TARGET): $(OBJS) - $(CC) $(CFLAGS) -o $@ $^ - -# Compiling source files into object files -%.o: %.c $(DEPS) - $(CC) $(CFLAGS) -c $< -o $@ - -# Clean rule clean: - rm -f $(OBJS) $(TARGET) - -# Phony targets -.PHONY: all clean + rm -f *.o compressor \ No newline at end of file