File: 30_makefile_fixes.patch

package info (click to toggle)
cccd 0.3beta4-7.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 428 kB
  • sloc: ansic: 6,032; makefile: 85
file content (81 lines) | stat: -rw-r--r-- 2,379 bytes parent folder | download
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Various Makefile fixes.

--- cccd-0.3beta4.orig/Makefile
+++ cccd-0.3beta4/Makefile
@@ -7,39 +7,42 @@
 CC = gcc
 
 # you may need to change this
-MAILPROG = "/bin/mail -i"
+MAILPROG = "/usr/bin/mail -i"
 
 # If $(TARGET) spits out too many debug messages, remove -DDEBUG from 
 # next line
 
-CFLAGS = -g -Wall `gtk-config --cflags` -DDEBUG
-#LDFLAGS = -lefence `gtk-config --libs` 
-LDFLAGS = `gtk-config --libs` 
+
+
+MY_CFLAGS = `pkg-config --cflags gtk+-2.0`
+
+#MY_LDFLAGS = -lefence `pkg-config --libs gtk+-2.0` 
+MY_LDFLAGS = -L/usr/lib `pkg-config --libs gtk+-2.0` 
 
 # production flags (no debugging)
-#CFLAGS = -O2 -Wall `gtk-config --cflags`
-#LDFLAGS = -s `gtk-config --libs` 
+#MY_CFLAGS = -O2 -Wall `pkg-config --cflags gtk+-2.0`
+#MY_LDFLAGS = -s `pkg-config --libs gtk+-2.0` 
 
 prefix=/usr/local
 bindir=$(prefix)/bin
-mandir=$(prefix)/man/man1
+mandir=$(prefix)/share/man/man1
 
-CFLAGS += -DMAILPROG="\"/bin/mail -i\""
+MY_CFLAGS += -DMAILPROG="\"/usr/bin/mail -i\""
 
 .SUFFIXES: .c
 
-.c.o: $(CC) -c $(CFLAGS) $<
+.c.o: $(CC) -c $(CFLAGS) $(MY_CFLAGS) $<
 
 all: $(TARGET)
 
 $(TARGET): $(OBJECTS)
-	gcc -o $(TARGET) $(OBJECTS) $(CFLAGS) $(LDFLAGS)
+	gcc -o $(TARGET) $(OBJECTS) $(CFLAGS) $(MY_CFLAGS) $(LDFLAGS) $(MY_LDFLAGS)
 
 install: $(TARGET)
 	mkdir -p $(bindir)
-	install -c -s -m 0755 cccd $(bindir)
+	install -c -m 0755 cccd $(bindir)
 	mkdir -p $(mandir)
-	install -c -m 0755 cccd.1 $(mandir)
+	install -c -m 0644 cccd.1 $(mandir)
 	@echo "Please read the README for additional installation hints"
 
 static:	$(OBJECTS)
@@ -49,12 +52,18 @@
 clean:
 	rm -rf core *.o $(TARGET)
 
-# dependancies, gcc `gtk-config --cflags` -MM *.c
-cccd.o: cccd.c general.h misc.h cd.h options.h cddb.h info.h cccd.h \
- icons.h
+# dependencies, gcc `gtk-config --cflags` -MM *.c
+cccd.o: cccd.c general.h misc.h cd.h options.h cddb.h info.h cccd.h icons.h
+	$(CC) -c $(CFLAGS) $(MY_CFLAGS) $<
 cd.o: cd.c cd.h
+	$(CC) -c $(CFLAGS) $(MY_CFLAGS) $<
 cddb.o: cddb.c general.h cd.h cddbp.h misc.h options.h cddb.h
+	$(CC) -c $(CFLAGS) $(MY_CFLAGS) $<
 cddbp.o: cddbp.c misc.h cddbp.h
+	$(CC) -c $(CFLAGS) $(MY_CFLAGS) $<
 info.o: info.c general.h misc.h cd.h cddb.h options.h cccd.h info.h
+	$(CC) -c $(CFLAGS) $(MY_CFLAGS) $<
 misc.o: misc.c
+	$(CC) -c $(CFLAGS) $(MY_CFLAGS) $<
 options.o: options.c general.h misc.h options.h
+	$(CC) -c $(CFLAGS) $(MY_CFLAGS) $<