espeakup/Makefile
William Hubbs c12ec3e1b0 moved version definition
This commit moves the version definition to espeakup.c instead of cli.c
2009-02-09 08:46:14 -06:00

54 lines
1,011 B
Makefile

SRCS = \
cli.c \
espeakup.c \
queue.c \
softsynth.c \
synth.c
OBJS = $(SRCS:.c=.o)
LDLIBS = -lespeak
PREFIX = /usr
MANDIR = $(PREFIX)/share/man/man8
BINDIR = $(PREFIX)/bin
ifeq ("$(origin TAG)", "command line")
TIMESTAMP := _p$(shell date +%Y%m%d)
endif
VERSION := $(shell grep 'Version.*=' espeakup.c | sed 's/.*"\(.*\)";/\1/')
TAG := v$(VERSION)
TARPREFIX := espeakup-$(VERSION)
TARFILE := $(TARPREFIX)$(TIMESTAMP).tar
all: espeakup
install: espeakup
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) -m 0755 $< $(DESTDIR)$(BINDIR)
$(INSTALL) -d $(DESTDIR)$(MANDIR)
$(INSTALL) -m 0644 espeakup.8 $(DESTDIR)$(MANDIR)
clean:
$(RM) $(OBJS)
distclean: clean
$(RM) espeakup
espeakup: $(OBJS)
tarball:
git archive --format=tar --prefix=$(TARPREFIX)/ $(TAG) > $(TARFILE)
tar f $(TARFILE) --delete $(TARPREFIX)/.gitignore
bzip2 $(TARFILE)
cli.o: cli.c espeakup.h
espeakup.o: espeakup.c espeakup.h
queue.o: queue.c espeakup.h
softsynth.o: softsynth.c espeakup.h
synth.o: synth.c espeakup.h