#
# Makefile for Camera application test
#
# Copyright (C) 2023 Renesas Electronics Corporation
# Copyright (C) 2023 Cogent Embedded, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
#
TARGET := capture

.PHONY: all clean distclean

CFLAGS ?= -O3

ifneq ($(DRM_ENABLE),)
LDFLAGS += $(shell pkg-config --libs libdrm)
CFLAGS += $(shell pkg-config --cflags libdrm)
CFLAGS += -DDRM_ENABLE
endif

all: $(TARGET)

distclean: clean

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

clean:
	$(RM) $(TARGET)
