Initial commit.
This commit is contained in:
commit
efee1b8dbb
5 changed files with 1068 additions and 0 deletions
33
Makefile
Normal file
33
Makefile
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue