From 8b96dba7cf9ba3c7b108980eb4f3cfa26806b792 Mon Sep 17 00:00:00 2001 From: "David M. Syzdek" Date: Fri, 22 Jul 2022 13:53:21 -0800 Subject: autotools: updating notes to prefer autotools build over basic build --- README.md | 10 +++++----- src/GNUmakefile | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6106632..2741e77 100644 --- a/README.md +++ b/README.md @@ -200,11 +200,6 @@ Downloading Source: $ git clone https://github.com/alaskacommunications/akcom-udpecho/ -Compiling source using basic method: - - $ cd akcom-udpecho/src - $ make && make install - Preparing and compiling source using GNU autotools method: $ cd akcom-udpecho/build @@ -212,6 +207,11 @@ Preparing and compiling source using GNU autotools method: $ ../configure $ make && make install +Compiling source using basic method: + + $ cd akcom-udpecho/src + $ make && make install + For more information on building and installing using configure, please read the INSTALL file. diff --git a/src/GNUmakefile b/src/GNUmakefile index 5f3f523..2174f75 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -64,10 +64,13 @@ OBJS = akcom-udpecho.lo \ akcom-udpechod.lo -.PHONY: all install clean uninstall +.PHONY: all all-progs install clean uninstall notice -all: $(PROGS) +all: notice + + +all-progs: $(PROGS) akcom-udpecho.lo: akcom-udpecho.c @@ -82,17 +85,45 @@ $(PROGS): $(OBJS) $(LIBTOOL) --mode=link --tag=CC gcc $(CFLAGS) -o $(@) $(@).lo -install: $(PROGS) +install: notice + + +install-progs: $(PROGS) $(INSTALL) $(INSTALL_OPTS) akcom-udpecho $(DESTDIR)$(PREFIX)/bin/akcom-udpecho $(INSTALL) $(INSTALL_OPTS) akcom-udpechod $(DESTDIR)$(PREFIX)/sbin/akcom-udpechod +notice: + @echo "" + @echo "" + @echo " ##########################################################" + @echo " # #" + @echo " # The preferred method of compiling is to the GNU #" + @echo " # autotools: #" + @echo " # #" + @echo " # $$ mkdir build && cd build #" + @echo " # $$ ../autogen.sh # (if obtaining source with GitI) #" + @echo " # $$ ../configure #" + @echo " # $$ make #" + @echo " # $$ make install #" + @echo " # #" + @echo " # To use make without autotools, run the following from #" + @echo " # the source ('src/') directory: #" + @echo " # #" + @echo " # $$ make all-progs #" + @echo " # $$ make install-progs #" + @echo " # #" + @echo " ##########################################################" + @echo "" + @echo "" + + uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/akcom-udpecho rm -f $(DESTDIR)$(PREFIX)/sbin/akcom-udpechod -clean: +clean: notice $(LIBTOOL) --mode=clean rm -f $(OBJS) $(LIBTOOL) --mode=clean rm -f $(PROGS) -- cgit v1.2.3