From ad319fac6f465276453a80c836107119909dd4fd Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Thu, 20 Mar 2014 09:52:09 -0700 Subject: [PATCH] automake / libtool support for programs in the examples/ subdirectory. Addresses part of Issue #152. --- Makefile.am | 2 +- configure.ac | 2 +- examples/Makefile | 18 ------------------ examples/Makefile.am | 12 ++++++++++++ 4 files changed, 14 insertions(+), 20 deletions(-) delete mode 100644 examples/Makefile create mode 100644 examples/Makefile.am diff --git a/Makefile.am b/Makefile.am index af437a64d..f0ad1ee97 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = src +SUBDIRS = src examples diff --git a/configure.ac b/configure.ac index bf819735f..6a2979f41 100644 --- a/configure.ac +++ b/configure.ac @@ -46,4 +46,4 @@ exit 1 # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -AC_OUTPUT([Makefile src/Makefile]) +AC_OUTPUT([Makefile src/Makefile examples/Makefile]) diff --git a/examples/Makefile b/examples/Makefile deleted file mode 100644 index c9990a9c7..000000000 --- a/examples/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -IPERFDIR = .. - -CC = gcc - -CFLAGS = -I$(IPERFDIR)/src -LDFLAGS = -L$(IPERFDIR)/src -LIBS = -liperf - -all: mic mis - -mic: mic.c $(IPERFDIR)/src/iperf_api.h $(IPERFDIR)/src/libiperf.a - $(CC) $(CFLAGS) mic.c $(LDFLAGS) $(LIBS) -o mic - -mis: mis.c $(IPERFDIR)/src/iperf_api.h $(IPERFDIR)/src/libiperf.a - $(CC) $(CFLAGS) mis.c $(LDFLAGS) $(LIBS) -o mis - -clean: - -rm -f mic mis *.o *.a a.out core core.* *.core diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 000000000..3b9dc87e0 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,12 @@ +noinst_PROGRAMS = mic mis # Build, but don't install + +mic_SOURCES = mic.c +mic_CFLAGS = -g -Wall +mic_LDADD = ../src/libiperf.la +mic_LDFLAGS = -g + +mis_SOURCES = mis.c +mis_CFLAGS = -g -Wall +mis_LDADD = ../src/libiperf.la +mis_LDFLAGS = -g +