p910nd: moved to github
[openwrt.org/packages.git] / multimedia / 020-makefile-tweaks.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
--- a/Makefile
+++ b/Makefile
@@ -10,19 +10,23 @@
 # or :
 # $ make install
 #
+PREFIX ?= /usr
+ICONV_PREFIX ?= $(PREFIX)
+INTL_PREFIX ?= $(PREFIX)
 #CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG
 #CFLAGS = -Wall -g -Os -D_GNU_SOURCE
 CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
-        -I/usr/include/ffmpeg \
-        -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \
-        -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat
+        -I$(PREFIX)/include/ffmpeg \
+        -I$(PREFIX)/include/libavutil -I$(PREFIX)/include/libavcodec -I$(PREFIX)/include/libavformat \
+        -I$(PREFIX)/include/ffmpeg/libavutil -I$(PREFIX)/include/ffmpeg/libavcodec -I$(PREFIX)/include/ffmpeg/libavformat
+
 #STATIC_LINKING: CFLAGS += -DSTATIC
 #STATIC_LINKING: LDFLAGS = -static
 CC = gcc
 RM = rm -f
 INSTALL = install
 
-INSTALLPREFIX ?= $(DESTDIR)/usr
+INSTALLPREFIX ?= $(DESTDIR)$(PREFIX)
 SBININSTALLDIR = $(INSTALLPREFIX)/sbin
 ETCINSTALLDIR = $(DESTDIR)/etc
 
@@ -37,7 +41,7 @@ BASEOBJS = minidlna.o upnphttp.o upnpdes
 
 ALLOBJS = $(BASEOBJS) $(LNXOBJS)
 
-LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis
+LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis -luuid $(ICONV_LIBS)
 #STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm
 
 TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
@@ -64,7 +68,7 @@ install-conf:
        $(INSTALL) -d $(ETCINSTALLDIR)
        $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR)
 
-minidlna:      $(BASEOBJS) $(LNXOBJS) $(LIBS)
+minidlna:      $(BASEOBJS) $(LNXOBJS)
        @echo Linking $@
        @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS)
 
 
comments