mid dev 2

This commit is contained in:
2025-10-22 06:13:27 -04:00
parent e22e6e90cb
commit 08e5c31957
27 changed files with 1795 additions and 0 deletions

38
alarm-snoozer/Makefile Normal file
View File

@@ -0,0 +1,38 @@
# Project structure
SRCDIR = src
BUILDDIR = build
TARGET = bin/main
# Compiler and flags
CXX = g++
CXXFLAGS = -std=c++11 -Wall -Iinclude
LDFLAGS =
# Find all source files
SRCS = $(wildcard $(SRCDIR)/*.cpp)
# Generate object file names from source files
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(BUILDDIR)/%.o,$(SRCS))
# Default target
all: $(TARGET)
# Link the program
$(TARGET): $(OBJS)
@mkdir -p $(@D)
$(CXX) $(LDFLAGS) -o $@ $^
# Compile source files into object files
$(BUILDDIR)/%.o: $(SRCDIR)/%.cpp
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) -c -o $@ $<
# Clean up
clean:
rm -rf $(BUILDDIR) bin
# Run the program
run: $(TARGET)
./$(TARGET)
.PHONY: all clean run