MusicalPi/Makefile

24 lines
360 B
Makefile
Raw Permalink Normal View History

2022-04-08 17:16:55 +00:00
CC := gcc
CFLAGS := -Wall -g
LIBRARIES := -lpthread
TARGET := musicalpi
SRCS := $(wildcard src/*.c)
OBJS := $(patsubst src/%.c, out/%.o, $(SRCS))
ALL: $(TARGET)
2022-04-16 12:00:43 +00:00
$(TARGET): mkdir $(OBJS)
2022-04-08 17:16:55 +00:00
$(CC) -o out/$@ $(filter-out $<, $^) $(LIBRARIES)
mkdir:
mkdir -p out
out/%.o: src/%.c
2022-04-16 12:00:43 +00:00
$(CC) $(CFLAGS) -o $@ -c $<
2022-04-08 17:16:55 +00:00
clean:
rm -rf $(TARGET) out
.PHONY: all clean