aboutsummaryrefslogtreecommitdiffstats
path: root/audio/cd-console/files/patch-Makefile
blob: 43fada8853d929b94f4c8b4297b32488d67ef855 (plain) (blame)
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
--- Makefile.orig   Sat Aug 25 11:09:00 2001
+++ Makefile    Mon Jun  3 19:55:53 2002
@@ -5,43 +5,46 @@
 # very welcome).
 
 # for linux
-DEFS = -DOS_LINUX
-EXTRA_OBJS = cd_ll_linux.o
+#DEFS = -DOS_LINUX
+#EXTRA_OBJS = cd_ll_linux.o
 
 # for bsd. only tested on freebsd
-#DEFS = -DOS_BSD
-#EXTRA_OBJS = cd_ll_bsd.o
-
+DEFS = -DOS_BSD
+EXTRA_OBJS = cd_ll_bsd.o
+CDDEVICE=\"/dev/cdrom\"
 
 # you shouldn't have to change anything below this line
 
-
+BINPATH=${PREFIX}/bin/
 OBJS=cd-console.o cd.o $(EXTRA_OBJS)
 LIBS = -lncurses
 
 # common
-CFLAGS=-O2 -Wall $(DEFS)
+CFLAGS+= $(DEFS)
 #CFLAGS=-g -Wall $(DEFS)
-CC = gcc
+#CC = gcc
 
 all:
    make cd-console
    strip cd-console
 
 cd-console: $(OBJS)
-   $(CC) $(OBJS) $(LIBS) -o cd-console $(CFLAGS)
+   $(CXX) $(OBJS) $(LIBS) -o cd-console $(CFLAGS)
 
 cd-console.o: cd.h cd-console.cpp
-   $(CC) -c cd-console.cpp $(CFLAGS)
+   $(CXX) -c cd-console.cpp $(CFLAGS)
 
 cd_ll_linux.o: cd_ll.h cd_ll_linux.h cd_ll_linux.cpp
-   $(CC) -c cd_ll_linux.cpp $(CFLAGS)
+   $(CXX) -c cd_ll_linux.cpp $(CFLAGS)
 
 cd_ll_bsd.o: cd_ll.h cd_ll_bsd.h cd_ll_bsd.cpp
-   $(CC) -c cd_ll_bsd.cpp $(CFLAGS)
+   $(CXX) -c -DDEVICE=$(CDDEVICE) cd_ll_bsd.cpp $(CFLAGS)
 
 cd.o: cd.h cd.cpp
-   $(CC) -c cd.cpp $(CFLAGS)
+   $(CXX) -c cd.cpp $(CFLAGS)
 
 clean:
    rm -f $(OBJS) cd-console
+
+install:
+   @$(BSD_INSTALL_PROGRAM) cd-console $(BINPATH)