Files
linuxframebufferRenditions/clock/build/Makefile
2024-09-27 19:32:14 -04:00

25 lines
483 B
Makefile

# build/Makefile
CC = gcc
CFLAGS = -Wall -I../include
SRCDIR = ../src
OBJDIR = ../obj
BINDIR = ../build
TARGET = clock
# Gather all source files in src directory
SOURCES = $(wildcard $(SRCDIR)/*.c)
OBJECTS = $(patsubst $(SRCDIR)/%.c, $(OBJDIR)/%.o, $(SOURCES))
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) -o $(BINDIR)/$(TARGET) $(OBJECTS) -lm
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJDIR)/*.o $(BINDIR)/$(TARGET)
.PHONY: all clean