Update sk1/Makefile
This commit is contained in:
parent
530e660cae
commit
9f28b757e5
19
sk1/Makefile
19
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)
|
||||
|
Loading…
Reference in New Issue
Block a user