evisum/src/tingle/makefile

24 lines
576 B
Makefile
Raw Normal View History

PROGRAM=tingle
SOURCES=tingle.c
CFLAGS=-O2 -Wall -pedantic -std=c99 -lpthread
2019-01-21 18:06:14 -08:00
LDFLAGS=-lm -pthread
HAVE_ALSA := 0
ALSA_TEST := $(shell pkg-config --exists alsa 1>&2 2>/dev/null; echo $$?)
HAVE_ALSA := $(shell if [ $(ALSA_TEST) -eq 0 ]; then echo "true"; else echo "false"; fi)
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
2018-10-24 10:03:38 -07:00
CFLAGS += -framework CoreAudio
else ifeq ($(UNAME),Linux)
ifeq ($(HAVE_ALSA),true)
CFLAGS += -lasound -DHAVE_ALSA=1
endif
endif
default:
2019-08-24 06:57:05 -07:00
$(CC) $(SOURCES) $(CFLAGS) $(LDFLAGS) -o tingle
clean:
-rm $(PROGRAM)