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 82 83 84 85 86 87 88 89 90
|
# Makefile for cdtool
# 2004, Max Vozeler <max@hinterhof.net>
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
includedir = @includedir@
libdir = @libdir@
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
CC = @CC@
INSTALL = @INSTALL@
STRIP = @STRIP@
CFLAGS = @MYCFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
DESTDIR =
PROGRAMS = cdown cdtool cdctrl cdtool2cddb
OBJECTS = commands.o hardware.o database.o info.o shuffle.o util.o
build: $(PROGRAMS)
debug: CFLAGS += -DDEBUG -O0
debug: STRIP =
debug: build
cdtool: $(OBJECTS) cdtool.o
$(CC) -o $@ $(LDFLAGS) $(OBJECTS) cdtool.o $(LIBS)
cdctrl: $(OBJECTS) cdctrl.o
$(CC) -o $@ $(LDFLAGS) $(OBJECTS) cdctrl.o $(LIBS)
cdown: $(OBJECTS) cdown.o
$(CC) -o $@ $(LDFLAGS) $(OBJECTS) cdown.o $(LIBS)
cdtool2cddb: cdtool2cddb.o
$(CC) -o $@ $(LDFLAGS) $(LIBS) $<
install: install-files install-links
install-files:
mkdir -p $(DESTDIR)$(bindir)
$(INSTALL) cdctrl $(DESTDIR)$(bindir) -o root
$(INSTALL) cdloop $(DESTDIR)$(bindir) -o root
$(INSTALL) cdadd $(DESTDIR)$(bindir) -o root
$(INSTALL) cdown $(DESTDIR)$(bindir) -o root
$(INSTALL) cdtool2cddb $(DESTDIR)$(bindir) -o root
mkdir -p $(DESTDIR)$(mandir)/man1
$(INSTALL) cdctrl.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) cdloop.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) cdadd.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) cdown.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) cdtool.1 $(DESTDIR)$(mandir)/man1
$(INSTALL) cdtool2cddb.1 $(DESTDIR)$(mandir)/man1
mkdir -p $(DESTDIR)$(libdir)/cdtool
$(INSTALL) cdtool $(DESTDIR)$(libdir)/cdtool -o root
LINKTARGET = ../lib/cdtool/cdtool
LINKS = cdplay cdpause cdstop cdclose cdeject cdir cdinfo cdreset \
cdvolume cdshuffle
install-links-local: LINKTARGET = cdtool
install-links-local: bindir = .
install-links-local: install-links
install-links:
for command in $(LINKS); do \
if ! test -h $(DESTDIR)$(bindir)/$$command; then \
echo installing $$command; \
rm -f $(DESTDIR)$(bindir)/$$command; \
ln -s $(LINKTARGET) $(DESTDIR)$(bindir)/$$command; \
fi; \
if ! test -h $(DESTDIR)$(mandir)/man1/$$command.1; then \
echo installing $$command.1; \
rm -f $(DESTDIR)$(mandir)/man1/$$command.1; \
ln -s cdtool.1 $(DESTDIR)$(mandir)/man1/$$command.1; \
fi; \
done
clean:
rm -f *.o $(PROGRAMS)
distclean: clean
rm -f config.cache config.log config.status Makefile config.h
|