Sample program for converting RGB to YCbCr and vice versa.
LIBSDL = -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lSDL_image -lpthread
PROG = typlayer
CC=g++
INCLS = -I/usr/include
#source codes
SRCS = typlayer.cpp rgb_ybr.cpp encode.cpp
#substitute .cpp by .o to obtain object filenames
OBJS = $(SRCS:.cpp=.o)
#$< evaluates to the target's dependencies,
#$@ evaluates to the target
$(PROG): $(OBJS)
$(CC) -o $@ $(OBJS) $(LIBSDL)
$(OBJS):
$(CC) -c $*.cpp $(INCLS)
clean:
rm $(OBJS)