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
|
$NetBSD: patch-aa,v 1.10 2006/01/12 16:45:37 joerg Exp $
--- makefile.orig 2005-01-04 23:18:48.000000000 +0000
+++ makefile
@@ -1,6 +1,6 @@
# configure daapd here
-HOWL_ENABLE = 0
+HOWL_ENABLE = 1
ZLIB_ENABLE = 1
MPEG4_ENABLE = 0
@@ -8,22 +8,22 @@ MPEG4_ENABLE = 0
# no need to touch anything below this line
# -----------------------------------------
-CC = g++
+CC = $(CXX)
MAKE = $(MAKE_COMMAND)
TARGET = daapd
DEPS = daaplib_ libhttpd_
OBJS = daapd.o db.o dboutput.o songcache.o parsemp3.o util.o
LIBS = -ldaaplib -lhttpd-persistent -lid3tag -lz
-LIBPATH = -L. -L./daaplib/src -L./libhttpd/src -L/usr/local/lib
-INCPATH = -I. -I./daaplib/include -I./libhttpd/src -I/usr/local/include
-DEPLOY = /usr/local
-CFLAGS = -Wall -Wno-multichar
+LIBPATH = -L. -L./daaplib/src -L./libhttpd/src -L$(PREFIX)/lib $(LDFLAGS)
+INCPATH = -I. -I./daaplib/include -I./libhttpd/src -I$(PREFIX)/include
+DEPLOY = $(PREFIX)
+CFLAGS += -Wall -Wno-multichar
# HOWL
ifeq ($(HOWL_ENABLE),1)
- HOWLDIRS := $(sort $(wildcard /usr/local/include/howl*) )
+ HOWLDIRS := $(sort $(wildcard $(PREFIX)/include/howl*) )
ifeq ($(words $(HOWLDIRS) ), 0)
-$(error howl not found in /usr/local/include. Install howl or disable it in the makefile)
+$(error howl not found in $(PREFIX)/include. Install howl or disable it in the makefile)
endif
HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )
INCPATH := $(INCPATH) -I$(HOWLRECENT)
@@ -46,11 +46,7 @@ ifneq ($(shell $(CC) -E -dM - < /dev/nul
LIBS := $(LIBS) -lsocket -lnsl
endif
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __FreeBSD__),)
- LIBS := $(LIBS) -pthread
-else
- LIBS := $(LIBS) -lpthread
-endif
+LIBS+= ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __sgi__),)
LIBS := $(LIBS) /usr/lib/snprintf.o
@@ -80,8 +76,6 @@ clean:
rm $(OBJS) $(TARGET)
install: $(DEPS) $(TARGET)
- cd libhttpd && $(MAKE) install
- cd daaplib/src && $(MAKE) install
cp $(TARGET) $(DEPLOY)/bin
chmod a+rx $(DEPLOY)/bin/$(TARGET)
cp $(TARGET).8 $(DEPLOY)/man/man8
|