90 lines
2.7 KiB
Plaintext
90 lines
2.7 KiB
Plaintext
$OpenBSD: patch-makefile,v 1.2 2006/05/08 21:25:52 jolan Exp $
|
|
--- makefile.orig Sun Mar 5 08:39:37 2006
|
|
+++ makefile Wed Apr 19 20:05:34 2006
|
|
@@ -2,34 +2,34 @@
|
|
|
|
HOWL_ENABLE = 1
|
|
ZLIB_ENABLE = 1
|
|
-MPEG4_ENABLE = 0
|
|
+MPEG4_ENABLE = 1
|
|
|
|
|
|
# no need to touch anything below this line
|
|
# -----------------------------------------
|
|
|
|
-CC = g++
|
|
+CC?= g++
|
|
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
|
|
+LIBPATH = -L. -L./daaplib/src -L./libhttpd/src -L$(LOCALBASE)/lib
|
|
+INCPATH = -I. -I./daaplib/include -I./libhttpd/src -I$(LOCALBASE)/include
|
|
DEPLOY = /usr/local
|
|
-CFLAGS = -Wall -Wno-multichar
|
|
+CFLAGS+= -Wall -Wno-multichar
|
|
|
|
# HOWL
|
|
ifeq ($(HOWL_ENABLE),1)
|
|
- HOWLDIRS := $(sort $(wildcard /usr/local/include/howl*) )
|
|
+ HOWLDIRS := $(sort $(wildcard $(LOCALBASE)/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 $(LOCALBASE)/include. Install howl or disable it in the makefile)
|
|
endif
|
|
HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )
|
|
INCPATH := $(INCPATH) -I$(HOWLRECENT)
|
|
LIBS := $(LIBS) -lhowl
|
|
CFLAGS := $(CFLAGS) -DHOWL_ENABLE
|
|
- ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __APPLE__),)
|
|
+ ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __APPLE__),)
|
|
LIBS := $(LIBS) -framework CoreFoundation
|
|
endif
|
|
endif
|
|
@@ -42,28 +42,28 @@ ifeq ($(MPEG4_ENABLE),1)
|
|
endif
|
|
|
|
# platform specific stuff
|
|
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __sun__),)
|
|
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __sun__),)
|
|
LIBS := $(LIBS) -lsocket -lnsl
|
|
endif
|
|
|
|
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __FreeBSD__),)
|
|
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | egrep '__FreeBSD__|__OpenBSD__'),)
|
|
LIBS := $(LIBS) -pthread
|
|
else
|
|
LIBS := $(LIBS) -lpthread
|
|
endif
|
|
|
|
-ifneq ($(shell $(CC) -E -dM - < /dev/null | grep __sgi__),)
|
|
+ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep __sgi__),)
|
|
LIBS := $(LIBS) /usr/lib/snprintf.o
|
|
endif
|
|
|
|
|
|
.cc.o:
|
|
- $(CC) $(CFLAGS) $(INCPATH) -c $<
|
|
+ $(CXX) $(CFLAGS) $(INCPATH) -c $<
|
|
|
|
all: $(DEPS) $(TARGET)
|
|
|
|
$(TARGET): $(OBJS)
|
|
- $(CC) $(CFLAGS) $(LIBPATH) -o $(TARGET) $(OBJS) $(LIBS)
|
|
+ $(CXX) $(CFLAGS) $(LIBPATH) -o $(TARGET) $(OBJS) $(LIBS)
|
|
|
|
$(OBJS): types.h dboutput.h songcache.h parsemp3.h
|
|
|
|
@@ -80,8 +80,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
|