From 6e4b8b24b9d6b628d51163e3ce3025afa5eb5779 Mon Sep 17 00:00:00 2001 From: Alexander Epaneshnikov Date: Thu, 23 Apr 2020 14:47:12 +0300 Subject: [PATCH] new src structure to make it more understandable and convenient for further improvements. --- .gitignore | 5 ++--- Makefile | 19 +++++++------------ ChangeLog => doc/ChangeLog | 0 TODO => doc/TODO | 0 espeakup.8 => doc/espeakup.8 | 0 cli.c => src/cli.c | 0 espeak.c => src/espeak.c | 0 espeakup.c => src/espeakup.c | 0 espeakup.h => src/espeakup.h | 0 queue.c => src/queue.c | 0 queue.h => src/queue.h | 0 signal.c => src/signal.c | 0 softsynth.c => src/softsynth.c | 0 stringhandling.c => src/stringhandling.c | 0 stringhandling.h => src/stringhandling.h | 0 15 files changed, 9 insertions(+), 15 deletions(-) rename ChangeLog => doc/ChangeLog (100%) rename TODO => doc/TODO (100%) rename espeakup.8 => doc/espeakup.8 (100%) rename cli.c => src/cli.c (100%) rename espeak.c => src/espeak.c (100%) rename espeakup.c => src/espeakup.c (100%) rename espeakup.h => src/espeakup.h (100%) rename queue.c => src/queue.c (100%) rename queue.h => src/queue.h (100%) rename signal.c => src/signal.c (100%) rename softsynth.c => src/softsynth.c (100%) rename stringhandling.c => src/stringhandling.c (100%) rename stringhandling.h => src/stringhandling.h (100%) diff --git a/.gitignore b/.gitignore index 7870fbc..d1c8b4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ espeakup -*.d -*.o -*.swp +src/*.d +src/*.o diff --git a/Makefile b/Makefile index 362e488..a2680ca 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ PREFIX = /usr/local BINDIR = ${PREFIX}/bin MANDIR = ${PREFIX}/share/man +SRC_DIR = src DEPFLAGS = -MMD WARNFLAGS = -Wall @@ -13,15 +14,8 @@ BINMODE = 0755 MANMODE = 0644 CHANGELOG_LIMIT?= --after="1 year ago" -SRCS = cli.c \ - espeak.c \ - espeakup.c \ - queue.c \ - signal.c \ - softsynth.c \ - stringhandling.c - -OBJS = ${SRCS:.c=.o} +SRC = $(wildcard $(SRC_DIR)/*.c) +OBJECTS := $(patsubst %.c,%.o,$(wildcard $(SRC_DIR)/*.c)) all: espeakup @@ -32,12 +26,13 @@ install: espeakup ${INSTALL} -d ${DESTDIR}${BINDIR} ${INSTALL} -m ${BINMODE} $< ${DESTDIR}${BINDIR} ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 - ${INSTALL} -m ${MANMODE} espeakup.8 ${DESTDIR}${MANDIR}/man8 + ${INSTALL} -m ${MANMODE} doc/espeakup.8 ${DESTDIR}${MANDIR}/man8 -espeakup: ${OBJS} +espeakup: ${OBJECTS} + cc $(LDLIBS) -o ./espeakup $(OBJECTS) clean: - ${RM} *.d *.o + ${RM} $(SRC_DIR)/*.d $(SRC_DIR)/*.o distclean: clean ${RM} espeakup diff --git a/ChangeLog b/doc/ChangeLog similarity index 100% rename from ChangeLog rename to doc/ChangeLog diff --git a/TODO b/doc/TODO similarity index 100% rename from TODO rename to doc/TODO diff --git a/espeakup.8 b/doc/espeakup.8 similarity index 100% rename from espeakup.8 rename to doc/espeakup.8 diff --git a/cli.c b/src/cli.c similarity index 100% rename from cli.c rename to src/cli.c diff --git a/espeak.c b/src/espeak.c similarity index 100% rename from espeak.c rename to src/espeak.c diff --git a/espeakup.c b/src/espeakup.c similarity index 100% rename from espeakup.c rename to src/espeakup.c diff --git a/espeakup.h b/src/espeakup.h similarity index 100% rename from espeakup.h rename to src/espeakup.h diff --git a/queue.c b/src/queue.c similarity index 100% rename from queue.c rename to src/queue.c diff --git a/queue.h b/src/queue.h similarity index 100% rename from queue.h rename to src/queue.h diff --git a/signal.c b/src/signal.c similarity index 100% rename from signal.c rename to src/signal.c diff --git a/softsynth.c b/src/softsynth.c similarity index 100% rename from softsynth.c rename to src/softsynth.c diff --git a/stringhandling.c b/src/stringhandling.c similarity index 100% rename from stringhandling.c rename to src/stringhandling.c diff --git a/stringhandling.h b/src/stringhandling.h similarity index 100% rename from stringhandling.h rename to src/stringhandling.h