Initial commit.

This commit is contained in:
Johannes Findeisen 2026-10-07 03:13:41 +02:00
commit efee1b8dbb
5 changed files with 1068 additions and 0 deletions

33
Makefile Normal file
View file

@ -0,0 +1,33 @@
CC = gcc
CFLAGS = -std=c99 -O2 -Wall -Wextra
PKGCONF = pkg-config
ALSA_CFLAGS := $(shell $(PKGCONF) --cflags alsa 2>/dev/null)
ALSA_LIBS := $(shell $(PKGCONF) --libs alsa 2>/dev/null)
ifeq ($(strip $(ALSA_LIBS)),)
ALSA_LIBS := -lasound
endif
LDLIBS = $(ALSA_LIBS) -lm
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
BINARY = tuxrecord
SRC = tuxrecord.c
all: $(BINARY)
$(BINARY): $(SRC)
$(CC) $(CFLAGS) $(ALSA_CFLAGS) -o $@ $< $(LDLIBS)
install: $(BINARY)
install -d $(DESTDIR)$(BINDIR)
install -m 755 $(BINARY) $(DESTDIR)$(BINDIR)/$(BINARY)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/$(BINARY)
clean:
rm -f $(BINARY)
.PHONY: all clean install uninstall