2006-04-23 20:25:27 +02:00
|
|
|
$NetBSD: patch-aa,v 1.12 2006/04/23 18:25:27 tonio Exp $
|
2005-04-05 22:27:02 +02:00
|
|
|
|
2006-04-23 20:25:27 +02:00
|
|
|
--- makefile.orig 2006-03-05 14:39:37.000000000 +0100
|
2006-01-12 17:45:37 +01:00
|
|
|
+++ makefile
|
2006-04-23 20:25:27 +02:00
|
|
|
@@ -2,28 +2,28 @@
|
2005-01-08 07:44:41 +01:00
|
|
|
|
2006-04-23 20:25:27 +02:00
|
|
|
HOWL_ENABLE = 1
|
2005-01-08 06:22:36 +01:00
|
|
|
ZLIB_ENABLE = 1
|
2006-01-24 16:18:38 +01:00
|
|
|
-MPEG4_ENABLE = 0
|
|
|
|
+MPEG4_ENABLE = $(WITH_FAAD)
|
|
|
|
|
2005-01-08 07:44:41 +01:00
|
|
|
|
|
|
|
# no need to touch anything below this line
|
2006-01-01 19:32:01 +01:00
|
|
|
# -----------------------------------------
|
|
|
|
|
|
|
|
-CC = g++
|
|
|
|
+CC = $(CXX)
|
|
|
|
MAKE = $(MAKE_COMMAND)
|
2005-10-10 15:06:11 +02:00
|
|
|
TARGET = daapd
|
2005-01-08 07:44:41 +01:00
|
|
|
DEPS = daaplib_ libhttpd_
|
2006-01-01 19:32:01 +01:00
|
|
|
OBJS = daapd.o db.o dboutput.o songcache.o parsemp3.o util.o
|
|
|
|
LIBS = -ldaaplib -lhttpd-persistent -lid3tag -lz
|
2004-11-20 16:08:23 +01:00
|
|
|
-LIBPATH = -L. -L./daaplib/src -L./libhttpd/src -L/usr/local/lib
|
2006-01-01 19:32:01 +01:00
|
|
|
-INCPATH = -I. -I./daaplib/include -I./libhttpd/src -I/usr/local/include
|
2004-06-05 21:07:51 +02:00
|
|
|
-DEPLOY = /usr/local
|
|
|
|
-CFLAGS = -Wall -Wno-multichar
|
2006-01-01 19:32:01 +01:00
|
|
|
+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)
|
2004-06-05 21:07:51 +02:00
|
|
|
+CFLAGS += -Wall -Wno-multichar
|
|
|
|
|
2005-01-08 07:44:41 +01:00
|
|
|
# HOWL
|
2004-06-05 21:07:51 +02:00
|
|
|
ifeq ($(HOWL_ENABLE),1)
|
2004-11-20 16:08:23 +01:00
|
|
|
- HOWLDIRS := $(sort $(wildcard /usr/local/include/howl*) )
|
2006-01-01 19:32:01 +01:00
|
|
|
+ HOWLDIRS := $(sort $(wildcard $(PREFIX)/include/howl*) )
|
2004-11-20 16:08:23 +01:00
|
|
|
ifeq ($(words $(HOWLDIRS) ), 0)
|
|
|
|
-$(error howl not found in /usr/local/include. Install howl or disable it in the makefile)
|
2006-01-01 19:32:01 +01:00
|
|
|
+$(error howl not found in $(PREFIX)/include. Install howl or disable it in the makefile)
|
2004-11-20 16:08:23 +01:00
|
|
|
endif
|
2005-01-08 07:44:41 +01:00
|
|
|
HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )
|
|
|
|
INCPATH := $(INCPATH) -I$(HOWLRECENT)
|
2006-01-12 17:45:37 +01:00
|
|
|
@@ -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:
|
2005-01-08 07:44:41 +01:00
|
|
|
rm $(OBJS) $(TARGET)
|
|
|
|
|
2004-06-05 21:07:51 +02:00
|
|
|
install: $(DEPS) $(TARGET)
|
|
|
|
- cd libhttpd && $(MAKE) install
|
|
|
|
- cd daaplib/src && $(MAKE) install
|
|
|
|
cp $(TARGET) $(DEPLOY)/bin
|
2005-01-08 07:44:41 +01:00
|
|
|
chmod a+rx $(DEPLOY)/bin/$(TARGET)
|
|
|
|
cp $(TARGET).8 $(DEPLOY)/man/man8
|