From 11cc053d822d563b9c040ce50341f8c8cd8b4f86 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 7 Sep 2009 16:57:00 -0500 Subject: [PATCH] reworked the makefile This version of the makefile should be more compatible with allowing users to pass in cflags. --- Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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