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