Untitled

mail@pastecode.io avatar
unknown
plain_text
8 months ago
626 B
2
Indexable
Never
# Compiler
CXX := g++

# Compiler flags
CXXFLAGS := -std=c++11 -Wall

# Directories
SRCDIR := src
BINDIR := bin

# Libraries
LIBS := $(shell pkg-config --libs opencv4) $(shell pkg-config --libs portaudio-2.0)

# Includes
INCLUDES := $(shell pkg-config --cflags opencv4) $(shell pkg-config --cflags portaudio-2.0)

# Source files
SRCS := $(wildcard $(SRCDIR)/*.cpp) $(wildcard $(SRCDIR)/*/*.cpp)

# Main executable
MAIN := main

.PHONY: all clean

all: $(BINDIR)/$(MAIN)

$(BINDIR)/$(MAIN): $(SRCS)
	@mkdir -p $(BINDIR)
	$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $^ $(LIBS)

clean:
	rm -rf $(BINDIR)
Leave a Comment