mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
added automatic dependency tracking to the Makefile
This commit is contained in:
parent
11cc053d82
commit
e66311bb99
2 changed files with 12 additions and 22 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
espeakup
|
||||
*.d
|
||||
*.o
|
||||
|
|
|
|||
33
Makefile
33
Makefile
|
|
@ -4,9 +4,14 @@ PREFIX = /usr/local
|
|||
MANDIR = $(PREFIX)/share/man/man8
|
||||
BINDIR = $(PREFIX)/bin
|
||||
|
||||
ALSA_SRCS = alsa.c
|
||||
PORTAUDIO_SRCS = portaudio.c
|
||||
SRCS = \
|
||||
ifndef AUDIO
|
||||
AUDIO=portaudio
|
||||
endif
|
||||
|
||||
alsa_SRCS = alsa.c
|
||||
portaudio_SRCS = portaudio.c
|
||||
|
||||
SRCS = $($(AUDIO)_SRCS) \
|
||||
cli.c \
|
||||
espeak.c \
|
||||
espeakup.c \
|
||||
|
|
@ -15,10 +20,7 @@ SRCS = \
|
|||
softsynth.c
|
||||
|
||||
ifeq ($(AUDIO),alsa)
|
||||
SRCS += $(ALSA_SRCS)
|
||||
SOUNDLIB = -lasound
|
||||
else
|
||||
SRCS += $(PORTAUDIO_SRCS)
|
||||
endif
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
|
@ -34,7 +36,7 @@ install: espeakup
|
|||
$(INSTALL) -m 0644 espeakup.8 $(DESTDIR)$(MANDIR)
|
||||
|
||||
clean:
|
||||
$(RM) *.o
|
||||
$(RM) *.d *.o
|
||||
|
||||
distclean: clean
|
||||
$(RM) espeakup
|
||||
|
|
@ -42,19 +44,6 @@ distclean: clean
|
|||
espeakup: $(OBJS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -Wall -c $<
|
||||
|
||||
alsa.o: alsa.c espeakup.h
|
||||
|
||||
cli.o: cli.c espeakup.h
|
||||
|
||||
espeak.o: espeak.c espeakup.h queue.h
|
||||
|
||||
espeakup.o: espeakup.c espeakup.h queue.h
|
||||
|
||||
portaudio.o: portaudio.c espeakup.h
|
||||
|
||||
queue.o: queue.c queue.h
|
||||
|
||||
softsynth.o: softsynth.c espeakup.h queue.h
|
||||
$(COMPILE.c) -MMD -Wall $(OUTPUT_OPTION) $<
|
||||
|
||||
-include $(SRCS:.c=.d)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue