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
|
$NetBSD: patch-aa,v 1.3 2005/03/02 17:50:18 rxg Exp $
--- Makefile.orig 2001-07-29 13:43:49.000000000 +0800
+++ Makefile
@@ -4,25 +4,25 @@
# Set these variables
#
# initial_directory is now set in the config file
-mpg123_location := "mpg123"
-ogg123_location := "ogg123"
-install_directory := "$(HOME)/bin"
+mpg123_location := "$(LOCALBASE)/bin/mpg123"
+ogg123_location := "$(LOCALBASE)/bin/ogg123"
+install_directory := "$(PREFIX)/bin"
#
# Location of config file - Please edit this file before installing
#
-config_file := "$(HOME)/.cmp3rc"
+#config_file := "$(HOME)/.cmp3rc"
#
# Uncomment and set if desired
#
## An ass repository is a nice thing to have. See README
-ass_repository := "$(HOME)/.cmp3ass"
+#ass_repository := "$(HOME)/.cmp3ass"
## Define this for bufferring or add other parameters to mpg123 and ogg123
-mpg123_params := -b 320
-ogg123_params := -d oss
+#mpg123_params := -b 320
+#ogg123_params := -d oss
# You need debugging info? Uncomment this and check /tmp/cmp3log
#debugging := 1
@@ -42,9 +42,9 @@ RNMP3PARAMS= -DVERSION="\$(VERSION)\"
# Something for me and my cd changer, you definately don't want it as it
# stands. Change the code to do something else you want it to do...
#PARAMS +=-DMY_CD
-LIBS= -lform -lncurses
-CFLAGS= -g -O -Inevlib
-CC= gcc
+LIBS= $(LDFLAGS) -lform -lncurses
+CFLAGS+= -Inevlib
+CC?= gcc
OBJS= cmp3common.o cmp3fileio.o cmp3manager.o cmp3curses.o \
cmp3llist.o cmp3main.o cmp3listfiles.o cmp3playlist.o cmp3volume.o \
cmp3general.o cmp3id3.o
@@ -60,6 +60,7 @@ PARAMS += -DEXEC_PARAMS="$(foreach token
PARAMS += -DOGG_PARAMS="$(foreach token, $(ogg123_params),\"$(token)\",)"
else
PARAMS += -DEXEC_PARAMS=\"\",
+PARAMS += -DOGG_PARAMS=\"\",
endif
ifdef filespacing
RNMP3PARAMS += -DSPACEIT
@@ -87,7 +88,7 @@ cmp3: lib $(OBJS)
$(CC) $(CFLAGS) $(OBJS) nevlib/libnev.a $(LIBS) -o cmp3
lib:
- @$(MAKE) -C nevlib lib
+ @$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" -C nevlib lib
cleanlib:
@$(MAKE) -C nevlib clean
|