add super simple makefile for building a single file

This commit is contained in:
Your Name
2025-12-07 15:04:50 +00:00
parent fe364ad25e
commit 63de9b0d3d
2 changed files with 21 additions and 0 deletions

21
makefile Normal file
View File

@@ -0,0 +1,21 @@
CC := gcc
CFLAGS := -Wall -Wextra -std=c11
LDLIBS := -lSDL2 -lSDL2_image
TARGET := waveform
SRC := waveform.c
# -------------------------------------------------
# Default target just type `make` to build
all: $(TARGET)
# How to build the executable
$(TARGET): $(SRC)
$(CC) $(CFLAGS) $^ $(LDLIBS) -o $@
# Convenience: `make clean` to remove the binary
clean:
rm -f $(TARGET)
.PHONY: all clean

View File