Added flac and mp3 output format.
This commit is contained in:
parent
e699adfa60
commit
3ff9ea07f5
4 changed files with 481 additions and 46 deletions
15
Makefile
15
Makefile
|
|
@ -3,10 +3,21 @@ 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)
|
||||
FLAC_CFLAGS := $(shell $(PKGCONF) --cflags flac 2>/dev/null)
|
||||
FLAC_LIBS := $(shell $(PKGCONF) --libs flac 2>/dev/null)
|
||||
LAME_CFLAGS := $(shell $(PKGCONF) --cflags lame 2>/dev/null)
|
||||
LAME_LIBS := $(shell $(PKGCONF) --libs lame 2>/dev/null)
|
||||
ifeq ($(strip $(ALSA_LIBS)),)
|
||||
ALSA_LIBS := -lasound
|
||||
endif
|
||||
LDLIBS = $(ALSA_LIBS) -lm
|
||||
ifeq ($(strip $(FLAC_LIBS)),)
|
||||
FLAC_LIBS := -lFLAC
|
||||
endif
|
||||
ifeq ($(strip $(LAME_LIBS)),)
|
||||
LAME_LIBS := -lmp3lame
|
||||
endif
|
||||
CPPFLAGS += $(ALSA_CFLAGS) $(FLAC_CFLAGS) $(LAME_CFLAGS)
|
||||
LDLIBS = $(ALSA_LIBS) $(FLAC_LIBS) $(LAME_LIBS) -lm
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR = $(PREFIX)/bin
|
||||
|
|
@ -17,7 +28,7 @@ SRC = tuxrecord.c
|
|||
all: $(BINARY)
|
||||
|
||||
$(BINARY): $(SRC)
|
||||
$(CC) $(CFLAGS) $(ALSA_CFLAGS) -o $@ $< $(LDLIBS)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $< $(LDLIBS)
|
||||
|
||||
install: $(BINARY)
|
||||
install -d $(DESTDIR)$(BINDIR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue