Initial Commit

This commit is contained in:
klein panic
2024-09-27 19:32:14 -04:00
commit 53610a8c1c
21 changed files with 1340 additions and 0 deletions

24
clock/build/Makefile Normal file
View File

@@ -0,0 +1,24 @@
# 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