Skip to content

Instantly share code, notes, and snippets.

@wkentaro
Created October 13, 2014 04:31
Show Gist options
  • Save wkentaro/fee7f1d625f23af2b2ea to your computer and use it in GitHub Desktop.
Save wkentaro/fee7f1d625f23af2b2ea to your computer and use it in GitHub Desktop.
OpenCV Makefile
CC :=g++
CFLAGS :=`pkg-config opencv --cflags` `pkg-config opencv --libs`
LDFLAGS :=
SOURCES :=$(wildcard *.cpp)
EXECUTABLE :=$(SOURCES:.cpp=)
all:$(EXECUTABLE)
$(EXECUTABLE):$(SOURCES)
$(CC) $< $(LDFLAGS) $(CFLAGS) -o $@
clean:
rm -rf $(EXECUTABLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment