Merge CV, ver=5.1; ops/methods from HV, and interface from CV where possible
[goodguy/history.git] / cinelerra-5.1 / build / Makefile.cinelerra
diff --git a/cinelerra-5.1/build/Makefile.cinelerra b/cinelerra-5.1/build/Makefile.cinelerra
new file mode 100644 (file)
index 0000000..6537a5e
--- /dev/null
@@ -0,0 +1,93 @@
+
+include global_config
+
+.NOTPARALLEL:
+
+ifeq (,$(filter -j,$(MAKEFLAGS)))
+cpus:=$(shell grep -c "^proc" /proc/cpuinfo)
+jobs:=-j$(shell echo $$(($(cpus) + $(cpus)/2 +2)))
+endif
+
+DIRS := \
+       thirdparty \
+       libzmpeg3 \
+       mpeg2enc \
+       mplexlo \
+       db \
+       guicast \
+       cinelerra \
+       plugins \
+       doc \
+       po
+
+all: $(OBJDIR)/soundtest
+       mkdir -p bin $(PLUGIN_DIR)
+       @ for i in $(DIRS) ; do \
+                $(MAKE) $(jobs) -C $$i ; \
+       done
+
+$(OBJDIR)/soundtest: $(OBJDIR)/soundtest.o
+       $(CC) -o $(OBJDIR)/soundtest $(OBJDIR)/soundtest.o -lm
+
+clean:
+       rm -rf bin
+       @ for i in $(DIRS) ; do \
+                $(MAKE) -C $$i clean ; \
+       done
+
+dist-clean:
+       find \( -name '*.lo' \
+               -o -name '*.o' \
+               -o -name '*.la' \
+               -o -name '*.a' \
+               -o -name '*.plugin' \
+               -o -name '*.so' \) -exec rm -f {} \; -prune
+       find \( -name $(OBJDIR) \) -exec rm -rf {} \; -prune
+#      find \( -name .deps \) -exec rm -rf {} \; -prune
+       find \( -name .libs \) -exec rm -rf {} \; -prune
+
+MJPEGDIR := $(shell expr $(THIRDPARTY)/mjpegtools* )
+MPEG2ENC := bin/mpeg2enc
+MPEG2PLEX := bin/mplex
+HVEG2ENC := bin/hveg2enc
+
+$(MPEG2ENC):
+       cp -a $(MJPEGDIR)/mpeg2enc/mpeg2enc $@
+
+$(MPEG2PLEX):
+       cp -a $(MJPEGDIR)/mplex/mplex $@
+
+$(HVEG2ENC):
+       cp -a $(TOPDIR)/mpeg2enc/$(OBJDIR)/hveg2enc $@
+
+install:       $(MPEG2PLEX) $(MPEG2ENC) $(HVEG2ENC)
+       $(MAKE) -C plugins install
+       DST=../bin $(MAKE) -C libzmpeg3 install
+       $(MAKE) -C po install
+       $(MAKE) -C doc install
+       cp COPYING README bin
+ifeq ($(STATIC_LIBRARIES), y)
+       if [ -d thirdparty/festival ]; then \
+               cp thirdparty/festival/src/main/festival bin ; \
+               cp -a thirdparty/festival/lib bin/ ; \
+       fi
+endif
+       cp -a models bin
+       cd bin && find -name '.svn' -exec rm -r {} \; -prune
+       rm -f bin/cutads bin/bdwrite bin/manual.pdf
+       cp -a cinelerra/$(OBJDIR)/cutads cinelerra/$(OBJDIR)/bdwrite bin/.
+       cp -a doc/manual.pdf bin/.
+       rm -f bin/new_db
+       $(MAKE) -C db/utils new_db
+       cp -a db/utils/new_db bin/.
+       cp -a ffmpeg msg.txt bin/.
+       @if [ ! -f "/cinelerra/media.db" ]; then \
+               echo "need to run:"; \
+               echo "  mkdir /cinelerra"; \
+               echo "  new_db /cinelerra/media.db"; \
+       fi
+COMPILE = $(GCC) -c $(CFLAGS) $? -o $*.o
+
+$(OBJDIR)/soundtest.o: soundtest.c
+       $(COMPILE)
+