-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
95 lines (79 loc) · 3.79 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
include makefile.common
GCC=@CC@
MOC=@QT_MOC@
CFLAGS=@CFLAGS_OPT@ -D_linux_ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
DESTDIR=@DESTDIR@
PREFIX=@prefix@
ENABLE_GUI=@ENABLE_GUI@
LIBDIR=$(PREFIX)/lib
BINDIR=$(PREFIX)/bin
DATADIR=$(PREFIX)/share
FFMPEG_CFLAGS=@ffmpeg_CFLAGS@
FFMPEG_LIBS=@ffmpeg_LIBS@
INSTALL=@INSTALL@
OBJCOPY=@OBJCOPY@
LD=@LD@
BUILDINFO_ARCH_NAME=$(shell $(GCC) -dumpmachine)
BUILDINFO_BUILD_DATE=$(shell date)
ifeq ($(ENABLE_GUI),yes)
OUT_GUI=out/makemkv
endif
all: out/libdriveio.so.0 out/libmakemkv.so.1 $(OUT_GUI) out/libmmbd.so.0
@echo "type \"sudo make install\" to install"
clean:
-rm -rf out tmp
install: out/libdriveio.so.0 out/libmakemkv.so.1 $(OUT_GUI) out/libmmbd.so.0
$(INSTALL) -D -m 644 out/libdriveio.so.0 $(DESTDIR)$(LIBDIR)/libdriveio.so.0
$(INSTALL) -D -m 644 out/libmakemkv.so.1 $(DESTDIR)$(LIBDIR)/libmakemkv.so.1
$(INSTALL) -D -m 644 out/libmmbd.so.0 $(DESTDIR)$(LIBDIR)/libmmbd.so.0
ifeq ($(DESTDIR),)
ldconfig
endif
ifeq ($(ENABLE_GUI),yes)
$(INSTALL) -D -m 755 out/makemkv $(DESTDIR)$(BINDIR)/makemkv
$(INSTALL) -D -m 644 makemkvgui/share/makemkv.desktop $(DESTDIR)$(DATADIR)/applications/makemkv.desktop
$(INSTALL) -D -m 644 makemkvgui/share/icons/16x16/makemkv.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps/makemkv.png
$(INSTALL) -D -m 644 makemkvgui/share/icons/22x22/makemkv.png $(DESTDIR)$(DATADIR)/icons/hicolor/22x22/apps/makemkv.png
$(INSTALL) -D -m 644 makemkvgui/share/icons/32x32/makemkv.png $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps/makemkv.png
$(INSTALL) -D -m 644 makemkvgui/share/icons/64x64/makemkv.png $(DESTDIR)$(DATADIR)/icons/hicolor/64x64/apps/makemkv.png
$(INSTALL) -D -m 644 makemkvgui/share/icons/128x128/makemkv.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps/makemkv.png
endif
out/%: out/%.full
$(OBJCOPY) --strip-all --strip-debug --strip-unneeded --discard-all $< $@
out/libdriveio.so.0.full:
mkdir -p out
$(GCC) $(CFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(LIBDRIVEIO_INC) $(LIBDRIVEIO_SRC) \
-fPIC -Xlinker -dy -Xlinker --version-script=libdriveio/src/libdriveio.vers \
-Xlinker -soname=libdriveio.so.0 -lc -lstdc++
out/libmakemkv.so.1.full: tmp/gen_buildinfo.h
mkdir -p out
$(GCC) $(CFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(LIBEBML_INC) $(LIBEBML_DEF) $(LIBMATROSKA_INC) \
$(LIBMAKEMKV_INC) $(SSTRING_INC) $(MAKEMKVGUI_INC) $(LIBABI_INC) $(LIBFFABI_INC) $(LIBDCADEC_DEF) \
$(LIBEBML_SRC) $(LIBMATROSKA_SRC) $(LIBMAKEMKV_SRC) $(GLIBC_SRC) $(SSTRING_SRC) \
$(LIBABI_SRC) $(LIBABI_SRC_LINUX) $(LIBFFABI_SRC) $(LIBDCADEC_SRC) \
-DHAVE_BUILDINFO_H -Itmp $(FFMPEG_CFLAGS) \
-fPIC -Xlinker -dy -Xlinker --version-script=libmakemkv/src/libmakemkv.vers \
-Xlinker -soname=libmakemkv.so.1 -lc -lstdc++ -lcrypto -lz -lexpat $(FFMPEG_LIBS) -lm -lrt
out/libmmbd.so.0.full:
mkdir -p out
$(GCC) $(CFLAGS) -D_REENTRANT -shared -Wl,-z,defs -o$@ $(MAKEMKVGUI_INC) $(LIBMMBD_INC) \
$(LIBMAKEMKV_INC) $(SSTRING_INC) $(LIBABI_INC) $(LIBMMBD_SRC) $(LIBMMBD_SRC_LINUX) $(SSTRING_SRC) \
-fPIC -Xlinker -dy -Xlinker --version-script=libmmbd/src/libmmbd.vers \
-Xlinker -soname=libmmbd.so.0 -lc -lstdc++ -lrt -lpthread -lcrypto
out/makemkv.full: $(MAKEMKVGUI_GEN) $(MAKEMKVGUI_SRC_LINUX) tmp/gen_buildinfo.h
mkdir -p out
$(GCC) $(CFLAGS) -o$@ $(MAKEMKVGUI_INC) $(LIBMAKEMKV_INC) $(SSTRING_INC) $(LIBDRIVEIO_INC) $(LIBABI_INC) \
$(MAKEMKVGUI_SRC) $(MAKEMKVGUI_SRC_LINUX) $(MAKEMKVGUI_GEN) $(SSTRING_SRC) $(LIBDRIVEIO_SRC_PUB) \
-DHAVE_BUILDINFO_H -Itmp \
@QT_INC@ -lc -lstdc++ \
@QT_LIB@ -lpthread -lz -lrt
tmp/gen_buildinfo.h:
mkdir -p tmp
echo "#define BUILDINFO_ARCH_NAME \"$(BUILDINFO_ARCH_NAME)\"" >> $@
echo "#define BUILDINFO_BUILD_DATE \"$(BUILDINFO_BUILD_DATE)\"" >> $@
tmp/moc_%.cpp : makemkvgui/src/%.h
mkdir -p tmp
$(MOC) -o $@ $<
tmp/image_data.o : makemkvgui/bin/image_data.bin
mkdir -p tmp
$(LD) -r -b binary -o $@ $<