diff options
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4lconvert/Makefile')
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4lconvert/Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/Makefile b/v4l2-apps/lib/libv4l/libv4lconvert/Makefile new file mode 100644 index 000000000..cbd54f471 --- /dev/null +++ b/v4l2-apps/lib/libv4l/libv4lconvert/Makefile @@ -0,0 +1,46 @@ +CC = gcc +LD = gcc + +CPPFLAGS = -fPIC -I../include -I../../../../linux/include + +CFLAGS := -g -O1 +CFLAGS += -Wall -W -Wno-unused -Wpointer-arith -Wstrict-prototypes + +LDFLAGS = -shared + +CONVERT_LIB = libv4lconvert.so +CONVERT_OBJS = libv4lconvert.o tinyjpeg.o \ + jidctflt.o spca561-decompress.o rgbyuv.o spca501.o bayer.o +TARGETS = $(CONVERT_LIB) +INCLUDES = ../include/libv4lconvert.h + +ifeq ($(LIB_RELEASE),) +LIB_RELEASE = 0 +endif + +ifeq ($(DESTDIR),) +DESTDIR = /usr/local +endif + +all: $(TARGETS) + +$(CONVERT_LIB): $(CONVERT_OBJS) + +install: all + mkdir -p $(DESTDIR)/include + cp $(INCLUDES) $(DESTDIR)/include + mkdir -p $(DESTDIR)/lib + cp $(CONVERT_LIB).$(LIB_RELEASE) $(DESTDIR)/lib + cd $(DESTDIR)/lib && \ + ln -f -s $(CONVERT_LIB).$(LIB_RELEASE) $(CONVERT_LIB) + +clean:: + rm -f *.so* *.o log *~ + rm -f *.d + +%.o: %.c + $(CC) -c -MMD $(CPPFLAGS) $(CFLAGS) -o $@ $< + +%.so: + $(CC) $(LDFLAGS) -Wl,-soname,$@.$(LIB_RELEASE) -o $@.$(LIB_RELEASE) $^ + ln -f -s $@.$(LIB_RELEASE) $@ |