-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_minidlna.patch
102 lines (94 loc) · 6.38 KB
/
Makefile_minidlna.patch
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
95
96
97
98
99
100
101
102
--- /home/stephan/dd-wrt/src/router/minidlna/Makefile 2021-03-31 23:13:07.900000000 +0200
+++ Makefile_minidlna 2021-03-05 19:27:20.773260400 +0100
@@ -38,7 +38,7 @@
# [FIXME] added by Michael Jiang.
# The below variables should be modified when you use different platform.
-HOST=$(ARCH)-linux-linux
+HOST=$(ARCH)-linux-gnu
HOST_COMPILE=$(HOST)-
CROSS_COMPILE=$(ARCH)-linux-uclibc-
#HOST_COMPILE=mipsel-linux-linux26-
@@ -68,6 +68,7 @@
HOST_COMPILE=$(HOST_COMPILE) \
MINI_DLNA_PATH=$(MINI_DLNA_PATH)) \
done
+ mkdir -p ./lib
make copy
(cd minidlna && make MINI_DLNA_PATH=$(MINI_DLNA_PATH) \
CROSS_COMPILE=$(CROSS_COMPILE) \
@@ -78,7 +79,7 @@
ffmpeg:
if [ ! -f ./ffmpeg-$(FFMPEG_VER)/config.mak ]; then \
- cd ffmpeg-$(FFMPEG_VER) && (symver_asm_label=no symver_gnu_asm=no symver=no CC="$(CC)" \
+ cd ffmpeg-$(FFMPEG_VER) && symver_asm_label=no symver_gnu_asm=no symver=no CC="$(CC)" \
./configure --enable-cross-compile --arch=$(ARCH) --target_os=linux \
--cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
--enable-pthreads --enable-small --disable-encoders --disable-filters \
@@ -94,27 +95,27 @@
--extra-cflags="$(COPTS) $(MIPS16_OPT) -ffunction-sections -fdata-sections -fPIC -D_GNU_SOURCE -I$(TOP)/zlib $(LTO)" \
--extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC $(LDLTO)" \
--extra-libs="-L$(TOP)/zlib -lz" \
- --enable-zlib --disable-debug --prefix=''); \
+ --enable-zlib --disable-debug --prefix=''; \
fi
libogg:
if [ ! -f ./libogg-1.3.0/Makefile ];then \
- cd libogg-1.3.0 && aclocal && libtoolize && ./autogen.sh && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -ffunction-sections -fdata-sections -Wl,--gc-sections" AR_FLAGS="cru $(LTOPLUGIN)" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)"); \
+ cd libogg-1.3.0 && aclocal && libtoolize && ./autogen.sh && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -ffunction-sections -fdata-sections -Wl,--gc-sections" AR_FLAGS="cru" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)"); \
fi
libexif:
if [ ! -f ./libexif-0.6.19/Makefile ];then \
- cd libexif-0.6.19 && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -ffunction-sections -fdata-sections -Wl,--gc-sections" AR_FLAGS="cru $(LTOPLUGIN)" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)"); \
+ cd libexif-0.6.19 && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -ffunction-sections -fdata-sections -Wl,--gc-sections" AR_FLAGS="cru" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)"); \
fi
libjpeg:
if [ ! -f ./jpeg-8/Makefile ];then \
- cd jpeg-8 && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -ffunction-sections -fdata-sections -Wl,--gc-sections" AR_FLAGS="cru $(LTOPLUGIN)" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)"); \
+ cd jpeg-8 && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -ffunction-sections -fdata-sections -Wl,--gc-sections" AR_FLAGS="cru" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)"); \
fi
sqlite3:
if [ ! -f ./sqlite-3.6.22/Makefile ];then \
- cd sqlite-3.6.22 && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -fcommon -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections -DSQLITE_OMIT_TRIGGERS" AR_FLAGS="cru $(LTOPLUGIN)" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
+ cd sqlite-3.6.22 && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" CFLAGS="$(COPTS) $(MIPS16_OPT) $(LTO) -fcommon -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections -DSQLITE_OMIT_TRIGGERS" AR_FLAGS="cru" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
--enable-threadsafe --enable-dynamic-extensions=no ); \
fi
@@ -127,7 +128,7 @@
cd libvorbis-1.3.3 && (./configure --host=$(HOST) --disable-shared CC="ccache $(CROSS_COMPILE)gcc" \
CFLAGS="$(COPTS) $(MIPS16_OPT) -I$(MINI_DLNA_PATH)/libogg-1.3.0/include/ -ffunction-sections -fdata-sections -Wl,--gc-sections" \
LDFLAGS="-L$(MINI_DLNA_PATH)/libogg-1.3.0/src/.libs/ $(LDLTO)" \
- AR_FLAGS="cru $(LTOPLUGIN)" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
+ AR_FLAGS="cru" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
); \
fi
flac:
@@ -137,7 +138,7 @@
CPPFLAGS="$(COPTS) $(MIPS16_OPT) -I$(MINI_DLNA_PATH)/libogg-1.3.0/include/ -ffunction-sections -fdata-sections -Wl,--gc-sections $(LTO)" \
CXXFLAGS="$(COPTS) $(MIPS16_OPT) -I$(MINI_DLNA_PATH)/libogg-1.3.0/include/ -ffunction-sections -fdata-sections -Wl,--gc-sections $(LTO)" \
LDFLAGS="-L$(MINI_DLNA_PATH)/libogg-1.3.0/src/.libs/ $(LDLTO)" \
- AR_FLAGS="cru $(LTOPLUGIN)" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
+ AR_FLAGS="cru" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
); \
fi
@@ -146,7 +147,7 @@
cd libid3tag-0.15.0b && (./configure --disable-shared --host=$(HOST) CC="ccache $(CROSS_COMPILE)gcc" \
CPPFLAGS="$(COPTS) $(MIPS16_OPT) -fPIC -I$(TOP)/zlib/ -ffunction-sections -fdata-sections -Wl,--gc-sections $(LTO)" \
LDFLAGS="-L$(TOP)/zlib/ -fPIC $(LDLTO)" \
- AR_FLAGS="cru $(LTOPLUGIN)" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
+ AR_FLAGS="cru" RANLIB="$(ARCH)-linux-ranlib $(LTOPLUGIN)" \
); \
fi
clean:
@@ -175,10 +176,10 @@
cp ./flac-1.2.1/src/libFLAC/.libs/libFLAC-static.a ./lib/libFLAC.a && \
cp ./libexif-0.6.19/libexif/.libs/libexif.a ./lib/libexif.a && \
cp ./libogg-1.3.0/src/.libs/libogg.a ./lib/libogg.a && \
- cp ./ffmpeg-$(FFMPEG_VER)/libavutil/libavutil.a ./lib/libavutil.a && \
+# cp ./ffmpeg-$(FFMPEG_VER)/libavutil/libavutil.a ./lib/libavutil.a && \
# cp ./ffmpeg-$(FFMPEG_VER)/libavdevice/libavdevice.a ./lib/libavdevice.a && \
- cp ./ffmpeg-$(FFMPEG_VER)/libavformat/libavformat.a ./lib/libavformat.a && \
- cp ./ffmpeg-$(FFMPEG_VER)/libavcodec/libavcodec.a ./lib/libavcodec.a && \
+# cp ./ffmpeg-$(FFMPEG_VER)/libavformat/libavformat.a ./lib/libavformat.a && \
+# cp ./ffmpeg-$(FFMPEG_VER)/libavcodec/libavcodec.a ./lib/libavcodec.a && \
cp ./sqlite-3.6.22/.libs/libsqlite3.a ./lib/libsqlite3.a && \
cp ./jpeg-8/.libs/libjpeg.a ./lib/libjpeg.a && \
cp ./libid3tag-0.15.0b/.libs/libid3tag.a ./lib/libid3tag.a