# SPDX-License-Identifier: GPL-2.0
# Makefile for kvcam-util
#
include ../scripts/Makefile.include

BUILD_TARGETS=kvcam-util
INSTALL_TARGETS = $(BUILD_TARGETS)

CFLAGS += -O2 -Wall -Wextra -pedantic -std=c99

all: $(BUILD_TARGETS)

%: %.c
	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

clean:
	$(RM) $(BUILD_TARGETS)
	make -C $(LIB_DIR) clean

sbindir ?= /usr/sbin

install: all
	install -d $(DESTDIR)$(sbindir)
	install -m 755 -p $(INSTALL_TARGETS) $(DESTDIR)$(sbindir)

