diff --git a/Makefile b/Makefile index 6687bdc..32c4293 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,9 @@ -CFLAGS += -Wall -LDLIBS = -lespeak +INSTALL = install PREFIX = /usr/local MANDIR = $(PREFIX)/share/man/man8 BINDIR = $(PREFIX)/bin -INSTALL = install - ALSA_SRCS = alsa.c PORTAUDIO_SRCS = portaudio.c SRCS = \ @@ -19,13 +16,15 @@ SRCS = \ ifeq ($(AUDIO),alsa) SRCS += $(ALSA_SRCS) -LDLIBS += -lasound +SOUNDLIB = -lasound else SRCS += $(PORTAUDIO_SRCS) endif OBJS = $(SRCS:.c=.o) +LDLIBS = -lespeak $(SOUNDLIB) + all: espeakup install: espeakup @@ -42,16 +41,20 @@ 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 -alsa.o: alsa.c espeakup.h - -portaudio.o: portaudio.c espeakup.h