1 diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
2 index a22a21a..fc6dfba 100644
3 --- a/cinelerra-5.1/cinelerra/Makefile
4 +++ b/cinelerra-5.1/cinelerra/Makefile
5 @@ -426,10 +426,13 @@ endif
8 ifeq ($(WANT_CIN_3RDPARTY),no)
9 -LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavutil
10 -LIBS += -lswresample -lswscale
11 -LIBS += -lintl -liconv
13 +LIBS += -L$(FF_PATH)/lib
14 +LIBS += -Wl,--out-implib,x86_64/libcin.exe.a
15 +LIBS += -Wl,-rpath-link=:$(FF_PATH)/lib -Wl,--as-needed -Wl,--warn-common
16 +LIBS += -lavdevice -lavfilter -lavformat -lavcodec
17 +LIBS += -lswresample -lswscale -lavutil
18 +LIBS += -L/usr/lib -lintl -liconv
19 +LIBS += -lsecur32 -lole32 -luser32 -luser32 -lbcrypt -lshell32
21 LIBS += $(shared_libs)
22 LIBS += $(system_libs)
23 @@ -492,7 +495,7 @@ CFLAGS += -DUSE_ALPHA
27 -LDFLAGS1 = -Wl,-export-dynamic -g
28 +LDFLAGS1 = -Wl,-export-all-symbols -g
30 LINKER = $(CXX) -o $(OUTPUT)
32 @@ -510,7 +513,7 @@ all: $(OUTPUT) $(CUTADS) $(BDWRITE) $(LV2UI)
33 $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES)
34 $(LINKER) `cat $(OBJDIR)/objs`
35 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
36 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
37 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
38 ln -f -s ../bin/$(WANT_CIN) ci
40 ifneq ($(WANT_COMMERCIAL),no)
41 @@ -518,7 +521,7 @@ $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES)
42 @echo $(CXX) -o $@ $(CUTOBJS)
43 @$(CXX) $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS)
44 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo)
45 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS))
46 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS))
49 cp -av $(OBJDIR)/cutads $(BINDIR)/.
50 @@ -530,7 +533,7 @@ $(BDWRITE): $(BDWOBJS) $(LIBRARIES)
51 @echo $(CXX) -o $@ $(BDWOBJS)
52 @$(CXX) $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS)
53 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo)
54 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE))
55 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE))
58 cp -av $(OBJDIR)/bdwrite $(BINDIR)/.
59 @@ -573,7 +576,7 @@ $(OBJDIR)/lv2ui: $(LV2OBJS)
60 @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@
61 @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(GTK2_LIBS)
62 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo)
63 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))
64 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI))
68 diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h
69 index 8ee8800..9a17091 100644
70 --- a/cinelerra-5.1/db/tdb.h
71 +++ b/cinelerra-5.1/db/tdb.h
72 @@ -32,7 +32,7 @@ inline void operator delete[](void *t,size_t n) { free(t); }
81 diff --git a/cinelerra-5.1/guicast/bcresources.C b/cinelerra-5.1/guicast/bcresources.C
82 index 1d52855..fdab491 100644
83 --- a/cinelerra-5.1/guicast/bcresources.C
84 +++ b/cinelerra-5.1/guicast/bcresources.C
85 @@ -367,8 +367,8 @@ BC_Resources::BC_Resources(float x_scale, float y_scale)
86 BC_WindowBase::resources = this;
94 if( x_scale <= 0 ) x_scale = 1;
95 if( y_scale <= 0 ) y_scale = x_scale;
96 diff --git a/cinelerra-5.1/guicast/bcsignals.C b/cinelerra-5.1/guicast/bcsignals.C
97 index ffc8a1c..ad11365 100644
98 --- a/cinelerra-5.1/guicast/bcsignals.C
99 +++ b/cinelerra-5.1/guicast/bcsignals.C
101 #include <sys/prctl.h>
103 #include <sys/types.h>
104 +#include <sys/wait.h>
106 BC_Signals* BC_Signals::global_signals = 0;
107 static int signal_done = 0;
108 diff --git a/cinelerra-5.1/guicast/bctrace.C b/cinelerra-5.1/guicast/bctrace.C
109 index 7e45392..2d08b46 100644
110 --- a/cinelerra-5.1/guicast/bctrace.C
111 +++ b/cinelerra-5.1/guicast/bctrace.C
112 @@ -309,7 +309,7 @@ void BC_Trace::dump_traces(FILE *fp)
116 -void trace_info::set_owner() { owner = pthread_self(); }
117 +void trace_info::set_owner() { owner = (unsigned long)pthread_self(); }
118 void trace_info::unset_owner() { owner = 0; }
120 void BC_Trace::dump_locks(FILE *fp)
121 @@ -322,7 +322,7 @@ void BC_Trace::dump_locks(FILE *fp)
122 fprintf(fp," %p %s, %s %p%s",
123 p->info, p->title, p->loc,
124 (void*)p->tid, p->is_owner ? " *" : "");
125 - if( p->info->owner && p->info->owner != p->tid )
126 + if( p->info->owner && p->info->owner != (unsigned long)p->tid )
127 fprintf(fp," %p", (void*)p->info->owner);
130 diff --git a/cinelerra-5.1/guicast/filesystem.h b/cinelerra-5.1/guicast/filesystem.h
131 index c976135..5613702 100644
132 --- a/cinelerra-5.1/guicast/filesystem.h
133 +++ b/cinelerra-5.1/guicast/filesystem.h
135 #include "bcwindowbase.inc"
138 +#define dirent64 dirent
139 +#define readdir64 readdir
144 diff --git a/cinelerra-5.1/plugin_config b/cinelerra-5.1/plugin_config
145 index 56f4351..ecd5837 100644
146 --- a/cinelerra-5.1/plugin_config
147 +++ b/cinelerra-5.1/plugin_config
148 @@ -4,12 +4,21 @@ CFLAGS += -I../ -I$(CINELERRA) -I$(GUICAST) -I../colors -fPIC
149 CFLAGS += $(static_incs)
150 LFLAGS += $(static_libs)
153 +LFLAGS += -Wl,$(CINELERRA)/$(OBJDIR)/libcin.exe.a
154 +LFLAGS += -lintl -liconv
155 +ifneq ($(WANT_GL),no)
156 +LFLAGS += -lGL -lGLU
159 LDLINKER ?= $(CXX) -shared
160 $(shell mkdir -p $(OBJDIR))
164 PLUGIN_DIR := $(BINDIR)/plugins
165 OUTPUT_DIR = $(PLUGIN_DIR)/$($(PLUGIN))
166 -OUTPUT = $(OUTPUT_DIR)/$(PLUGIN).plugin
167 +OUTPUT = $(OUTPUT_DIR)/$(PLUGIN).$(SFX)
168 OUTPUT_G = $(OBJDIR)/$(PLUGIN).debuginfo
170 $(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
171 @@ -20,16 +29,16 @@ ifeq ($(OUTPUT_THEME),)
172 $(OUTPUT): $(OBJS) $(OUTPUT_DIR) $(OUTPUT_BINS)
173 $(LDLINKER) -o $(OUTPUT) $(OBJS) $(OUTPUT_BINS) `cat $(OBJDIR)/l_flags`
174 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
175 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
176 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
180 THEME_DATA = $(OBJDIR)/$(PLUGIN)_data.o
182 $(OUTPUT_THEME): $(OBJS) $(OUTPUT_DIR) $(THEME_DATA)
183 - $(LDLINKER) -o $(OUTPUT_THEME) $(OBJS) $(THEME_DATA) $(LDFLAGS)
184 + $(LDLINKER) -o $(OUTPUT_THEME) $(OBJS) $(THEME_DATA) `cat $(OBJDIR)/l_flags`
185 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT_THEME) $(OUTPUT_G))
186 - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT_THEME))
187 + #$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT_THEME))
191 diff --git a/cinelerra-5.1/plugins/Makefile b/cinelerra-5.1/plugins/Makefile
192 index 22bc7dd..6404536 100644
193 --- a/cinelerra-5.1/plugins/Makefile
194 +++ b/cinelerra-5.1/plugins/Makefile
195 @@ -36,7 +36,6 @@ DIRS = $(OPENCV_OBJS) \
203 @@ -176,6 +175,8 @@ DIRS = $(OPENCV_OBJS) \
210 PLUGIN_DIR = $(BINDIR)/plugins
211 DATA = $(PLUGIN_DIR)/fonts $(PLUGIN_DIR)/shapes