add libbthread to main directory for Android from Andrew
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / Makefile
index 30f5e2c6b98e8b312e6e45764910fe2d81d9e31e..d9ff3b933e166f9596a11a57a37ba819ec60465b 100644 (file)
@@ -434,11 +434,27 @@ endif
 LIBS := $(LIBRARIES)
 
 ifeq ($(WANT_CIN_3RDPARTY),no)
-LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavutil
+LIBS += -lavfilter -lavformat -lavcodec -lavutil
 LIBS += -lswresample -lswscale
+PLATFORM = $(shell uname -s)
+ifneq (, $(filter $(PLATFORM), FreeBSD NetBSD))
 LIBS += -lintl -liconv
 LIBS += -lexecinfo
-
+endif
+LIBS += `pkg-config --libs OpenEXR`
+LIBS += `pkg-config --libs flac`
+LIBS += `pkg-config --libs libjpeg`
+LIBS += `pkg-config --libs uuid`
+LIBS += `pkg-config --libs theora`
+LIBS += `pkg-config --libs vorbis`
+LIBS += `pkg-config --libs sndfile`
+ifeq ($(WANT_LIBZMPEG),yes)
+LIBS += -la52 -ltwolame -lmp3lame
+endif
+LIBS += -lgif -ltheoraenc -ltheoradec -lvorbisfile -lvorbisenc -ltiff
+ifeq ($(shell uname -o), Android)
+LIBS += -landroid-shmem -liconv ../libbthread-master/jpt.a
+endif
 LIBS += $(shared_libs)
 LIBS += $(system_libs)
 else
@@ -467,6 +483,7 @@ LV2OBJS = \
        $(OBJDIR)/pluginlv2ui.o \
        $(OBJDIR)/pluginlv2config.o \
        $(OBJDIR)/forkbase.o
+LIBS += `pkg-config --libs lilv-0`
 endif
 
 CFLAGS := \
@@ -561,6 +578,7 @@ tags:
        ctags -R -h default --langmap=c:+.inc . ../guicast/ ../libzmpeg3 ../plugins ../thirdparty/ffmpeg-*
 
 $(OBJDIR)/fileexr.o:   BFLAGS:= -Wno-deprecated -std=c++11
+$(OBJDIR)/filedpx.o:   BFLAGS:= -Wno-deprecated -std=c++11
 $(OBJDIR)/sha1.o:      BFLAGS:= -O3
 $(OVERLAYS):           BFLAGS:= -Ofast -g0
 
@@ -571,6 +589,7 @@ $(OBJDIR)/%.o:              %.C
 ifneq ($(WANT_LV2),no)
 GTK2_INCS := `pkg-config --cflags gtk+-2.0` -Wno-deprecated-declarations
 GTK2_LIBS := `pkg-config --libs gtk+-2.0`
+LV2_LIBS  := `pkg-config --libs lilv-0` `pkg-config --libs suil-0`
 
 $(OBJDIR)/pluginlv2ui.o:       pluginlv2ui.C
 $(OBJDIR)/lv2ui.o:     lv2ui.C
@@ -579,7 +598,7 @@ $(OBJDIR)/pluginlv2ui.o $(OBJDIR)/lv2ui.o:
 
 $(OBJDIR)/lv2ui: $(LV2OBJS)
        @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@
-       @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(GTK2_LIBS)
+       @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(LV2_LIBS) $(GTK2_LIBS)
        $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo)
        $(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))