Обновить sk1/Makefile
This commit is contained in:
parent
cb5619f567
commit
9d92249280
33
sk1/Makefile
33
sk1/Makefile
@ -0,0 +1,33 @@
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -Wextra -std=c11
|
||||
|
||||
# Targets
|
||||
TARGET = compressor
|
||||
|
||||
# Source files
|
||||
SRCS = main.c compressor.c
|
||||
|
||||
# Object files
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
# Header files
|
||||
DEPS = compressor.h
|
||||
|
||||
# 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
|
Loading…
Reference in New Issue
Block a user