# Makefile for wavrec

CC = gcc
CFLAGS = -Wall -O2 -pthread
LDFLAGS = -lasound -lm -pthread
TARGET = wavrec
SOURCES = wavrec.c

all: $(TARGET)

$(TARGET): $(SOURCES)
	$(CC) $(CFLAGS) -o $(TARGET) $(SOURCES) $(LDFLAGS)

clean:
	rm -f $(TARGET)

install:
	cp $(TARGET) /usr/local/bin/

uninstall:
	rm -f /usr/local/bin/$(TARGET)

.PHONY: all clean install uninstall