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
|
CC = gcc
|
||||||
CFLAGS = -Wall -Wextra -g
|
CFLAGS = -Wall -Wextra -O2
|
||||||
SRC = main.c compressor.c
|
|
||||||
OBJ = main.o compressor.o
|
OBJ = main.o compressor.o
|
||||||
EXEC = compressor
|
TARGET = compressor
|
||||||
|
|
||||||
# Cieľ "all", ktorý kompiluje program
|
$(TARGET): $(OBJ)
|
||||||
all: $(EXEC)
|
$(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
|
main.o: main.c compressor.h
|
||||||
$(CC) $(CFLAGS) -c main.c
|
$(CC) $(CFLAGS) -c main.c
|
||||||
|
|
||||||
# Pravidlo pre kompiláciu compressor.o
|
|
||||||
compressor.o: compressor.c compressor.h
|
compressor.o: compressor.c compressor.h
|
||||||
$(CC) $(CFLAGS) -c compressor.c
|
$(CC) $(CFLAGS) -c compressor.c
|
||||||
|
|
||||||
# Čistiace pravidlo (vymaže skompilované súbory)
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJ) $(EXEC)
|
rm -f $(OBJ) $(TARGET)
|
||||||
|
Loading…
Reference in New Issue
Block a user