Update sk1/Makefile
This commit is contained in:
parent
1e0bd8ebaf
commit
b673ec84b1
24
sk1/Makefile
24
sk1/Makefile
@ -1,21 +1,15 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Wall -Wextra -std=c11
|
CFLAGS = -Wall -g
|
||||||
|
OBJ = main.o compressor.o
|
||||||
|
|
||||||
SRC = main.c compressor.c
|
compressor: $(OBJ)
|
||||||
HEADERS = compressor.h
|
$(CC) $(CFLAGS) -o compressor $(OBJ)
|
||||||
OBJ = $(SRC:.c=.o)
|
|
||||||
|
|
||||||
TARGET = compressor
|
main.o: main.c compressor.h
|
||||||
|
$(CC) $(CFLAGS) -c main.c
|
||||||
|
|
||||||
all: $(TARGET)
|
compressor.o: compressor.c compressor.h
|
||||||
|
$(CC) $(CFLAGS) -c compressor.c
|
||||||
$(TARGET): $(OBJ)
|
|
||||||
$(CC) $(CFLAGS) -o $@ $^
|
|
||||||
|
|
||||||
%.o: %.c $(HEADERS)
|
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJ) $(TARGET)
|
rm -f *.o compressor
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
|
Loading…
Reference in New Issue
Block a user