Skip to content

Instantly share code, notes, and snippets.

@OliverUv
Created Feb 25, 2014
Embed
What would you like to do?
# REQUIREMENTS
# - libx11-dev
SHELL = /bin/sh
CC = gcc
LINKER = gcc
FLAGS = -pg
CFLAGS = -fPIC -c
LDFLAGS = -shared
DEBUGFLAGS = -ggdb
LIBS = libyuv/libyuv.a libvpx.a $(shell pkg-config --libs --cflags x11) -lstdc++ -lrt
# For the shared library to work the libsc.so file's parent directory must be in your LD_LIBRARY_PATH.
# Check whether your system can find this library by executing `ldd shared_captester`.
SCLIB = -L. -lsc
all: libsc.so captester shared_captester
captester: captester.cpp libsc.o
$(CC) $(FLAGS) $(DEBUGFLAGS) -o $@ $^ $(LIBS)
shared_captester: captester.cpp libsc.so
$(CC) $(FLAGS) $(DEBUGFLAGS) -o $@ $< $(LIBS) $(SCLIB)
libsc.so: libsc.o
$(LINKER) $(LDFLAGS) $(FLAGS) $(DEBUGFLAGS) -o $@ $^ $(LIBS)
libsc.o: libsc.cpp
$(CC) $(CFLAGS) $(FLAGS) $(DEBUGFLAGS) -o $@ $^ $(LIBS)
profile:
gprof captester gmon.out > analysis.txt
run:
./captester
gprof captester gmon.out > analysis.txt
./makemov.sh
clean:
rm -f *.o *.so *.png *.webm *.ivf captester shared_captester gmon.out analysis.txt makemov.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment