reworked the makefile

This version of the makefile should be more compatible with allowing
users to pass in cflags.
This commit is contained in:
William Hubbs 2009-09-07 16:57:00 -05:00
commit 11cc053d82

View file

@ -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