blob: ed338d7d16872e990d74fe53c972c331dfbcd4ca (
plain)
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
|
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,7 @@
-CC=gcc
-CFLAGS=-Wall -g
+CFLAGS += -Wall
BINS=cdctl sndreset
OBJS=cdctl.o version.o ioctls.o iso_header.o
-DOCS=NEWS NUTSANDBOLTS LICENSE PUBLICKEY README SEGFAULTS
+DOCS=NEWS NUTSANDBOLTS LICENSE PUBLICKEY README
# NOTE: all man pages are installed in $(mandir)/man1 -- see install-mans
MANS=cdctl.1
MOS=cdctl.mo
@@ -22,6 +21,8 @@ INSTALL = @INSTALL@
INSTALL_DIR = $(INSTALL) -d
INSTALL_DATA = $(INSTALL) -m 644
+DESTDIR =
+
all: $(BINS)
cdctl: $(OBJS)
@@ -35,25 +36,21 @@ iso_header.o: iso_header.c
indent:
indent -kr -cdb -sc *.c
-install: install-bins install-docs install-mans install-mos
+install: install-bins install-mans install-mos
install-bins: $(BINS)
- $(INSTALL_DIR) $(bindir)
- $(INSTALL) -s $(BINS) $(bindir)
-
-install-docs: $(DOCS)
- $(INSTALL_DIR) $(docdir)
- $(INSTALL_DATA) $(DOCS) $(docdir)
+ $(INSTALL_DIR) $(DESTDIR)$(bindir)
+ $(INSTALL) $(BINS) $(DESTDIR)$(bindir)
install-mans: $(MANS)
- $(INSTALL_DIR) $(mandir)/man1
- $(INSTALL_DATA) $(MANS) $(mandir)/man1
+ $(INSTALL_DIR) $(DESTDIR)/$(mandir)/man1
+ $(INSTALL_DATA) $(MANS) $(DESTDIR)$(mandir)/man1
# FIXME: need to deal with other languages besides German
install-mos: cdctl.mo
- $(INSTALL_DIR) $(localedir)/de/LC_MESSAGES
- $(INSTALL_DATA) $(MOS) $(localedir)/de/LC_MESSAGES
+ $(INSTALL_DIR) $(DESTDIR)$(localedir)/de/LC_MESSAGES
+ $(INSTALL_DATA) $(MOS) $(DESTDIR)$(localedir)/de/LC_MESSAGES
cdctl.mo: cdctl.po
msgfmt cdctl.po -o cdctl.mo
|