add libbthread to main directory for Android from Andrew
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / Makefile
index f4e536b555b66b1361365480d4ce6b0b5543a1c0..d9ff3b933e166f9596a11a57a37ba819ec60465b 100644 (file)
@@ -56,7 +56,6 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/assets.o \
        $(OBJDIR)/atrack.o \
        $(OBJDIR)/attachmentpoint.o \
-       $(OBJDIR)/audio1394.o \
        $(OBJDIR)/audioalsa.o \
        $(OBJDIR)/audiodevice.o \
        $(OBJDIR)/audiodvb.o \
@@ -70,8 +69,6 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/automation.o \
        $(OBJDIR)/auto.o \
        $(OBJDIR)/autos.o \
-       $(OBJDIR)/avc1394control.o \
-       $(OBJDIR)/avc1394transport.o \
        $(OBJDIR)/awindowgui.o \
        $(OBJDIR)/awindow.o \
        $(OBJDIR)/batch.o \
@@ -79,6 +76,7 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/bdcreate.o \
        $(OBJDIR)/binfolder.o \
        $(OBJDIR)/bitspopup.o \
+       $(OBJDIR)/boxblur.o \
        $(OBJDIR)/brender.o \
        $(OBJDIR)/browsebutton.o \
        $(OBJDIR)/byteorderpopup.o \
@@ -111,8 +109,6 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/cwindowtool.o \
        $(OBJDIR)/dcoffset.o \
        $(OBJDIR)/deleteallindexes.o \
-       $(OBJDIR)/device1394input.o \
-       $(OBJDIR)/device1394output.o \
        $(OBJDIR)/devicedvbinput.o \
        $(OBJDIR)/devicev4l2base.o \
        $(OBJDIR)/devicev4l2input.o \
@@ -137,6 +133,7 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/filebaseulaw.o \
        $(OBJDIR)/filecr2.o \
        $(OBJDIR)/filedv.o \
+       $(OBJDIR)/filedpx.o \
        $(OBJDIR)/fileexr.o \
        $(OBJDIR)/fileffmpeg.o \
        $(OBJDIR)/fileflac.o \
@@ -169,8 +166,6 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/garbage.o \
        $(OBJDIR)/gwindowgui.o \
        $(OBJDIR)/gwindow.o \
-       $(OBJDIR)/iec61883input.o \
-       $(OBJDIR)/iec61883output.o \
        $(OBJDIR)/indexable.o \
        $(OBJDIR)/indexfile.o \
        $(OBJDIR)/indexstate.o \
@@ -338,7 +333,6 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/undostack.o \
        $(OBJDIR)/vattachmentpoint.o \
        $(OBJDIR)/vautomation.o \
-       $(OBJDIR)/vdevice1394.o \
        $(OBJDIR)/vdevicebase.o \
        $(OBJDIR)/vdevicedvb.o \
        $(OBJDIR)/vdeviceprefs.o \
@@ -377,6 +371,18 @@ OBJS := $(OVERLAYS) \
        $(OBJDIR)/zwindow.o \
        $(OBJDIR)/zwindowgui.o \
 
+ifneq ($(WANT_FIREWIRE),no)
+OBJS += \
+       $(OBJDIR)/audio1394.o \
+       $(OBJDIR)/avc1394control.o \
+       $(OBJDIR)/avc1394transport.o \
+       $(OBJDIR)/vdevice1394.o \
+       $(OBJDIR)/device1394input.o \
+       $(OBJDIR)/device1394output.o \
+       $(OBJDIR)/iec61883input.o \
+       $(OBJDIR)/iec61883output.o \
+
+endif
 ifneq ($(WANT_LIBZMPEG),no)
 OBJS += \
        $(OBJDIR)/audiompeg.o \
@@ -428,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
@@ -461,6 +483,7 @@ LV2OBJS = \
        $(OBJDIR)/pluginlv2ui.o \
        $(OBJDIR)/pluginlv2config.o \
        $(OBJDIR)/forkbase.o
+LIBS += `pkg-config --libs lilv-0`
 endif
 
 CFLAGS := \
@@ -554,7 +577,8 @@ clean:
 tags:
        ctags -R -h default --langmap=c:+.inc . ../guicast/ ../libzmpeg3 ../plugins ../thirdparty/ffmpeg-*
 
-$(OBJDIR)/fileexr.o:   BFLAGS:= -Wno-deprecated
+$(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
 
@@ -565,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
@@ -573,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))
 
@@ -587,9 +612,16 @@ install:   install-lv2ui
 endif
 
 ifneq ($(WANT_SHUTTLE),no)
+X11_INCS := /usr/include/
+X11_INCS1 := $(shell pkg-config --cflags-only-I x11 | sed "s/-I//")
+
+ifneq ($(X11_INCS1),)
+X11_INCS := $(X11_INCS1)
+endif
+
 $(OBJDIR)/shuttle.o:   shuttle.C shuttle_keys.h
-shuttle_keys.h: /usr/include/X11/keysymdef.h
-       sed -n < /usr/include/X11/keysymdef.h > shuttle_keys.h -f shuttle.sed
+shuttle_keys.h: $(X11_INCS)/X11/keysymdef.h
+       sed -n $(X11_INCS)/X11/keysymdef.h > shuttle_keys.h -f shuttle.sed
 endif
 
 $(OBJDIR)/pluginlv2gui.o:      pluginlv2gui.C