From 4b7c5a1241a7235a09d609577e078a0bd3bb9cfe Mon Sep 17 00:00:00 2001 From: philburk Date: Wed, 7 Sep 2011 23:54:04 +0000 Subject: [PATCH] Experiment with moving example code into its own folder. Note that this revision needs to have autoreconf run. I tried to do that on Mac but it failed. So I will try on Linux. --- Makefile.in | 11 ++++++++++- test/patest_sine.c => examples/paex_sine.c | 0 2 files changed, 10 insertions(+), 1 deletion(-) rename test/patest_sine.c => examples/paex_sine.c (100%) diff --git a/Makefile.in b/Makefile.in index 3f3fb4a..c1b3754 100644 --- a/Makefile.in +++ b/Makefile.in @@ -67,6 +67,9 @@ LOOPBACK_OBJS = \ qa/loopback/src/write_wav.o \ qa/loopback/src/paqa.o +EXAMPLES = \ + bin/paex_sine + TESTS = \ bin/paqa_devs \ bin/paqa_errs \ @@ -151,10 +154,12 @@ SRC_DIRS = \ SUBDIRS = @ENABLE_CXX_TRUE@SUBDIRS += bindings/cpp -all: lib/$(PALIB) all-recursive tests +all: lib/$(PALIB) all-recursive tests examples tests: bin-stamp $(TESTS) +examples: bin-stamp $(EXAMPLES) + loopback: bin-stamp bin/paloopback # With ASIO enabled we must link libportaudio and all test programs with CXX @@ -166,6 +171,10 @@ $(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS) @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS) +$(EXAMPLES): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) examples/%.c + @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS) + @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS) + bin/paloopback: lib/$(PALIB) $(MAKEFILE) $(PAINC) $(LOOPBACK_OBJS) @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS) @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS) diff --git a/test/patest_sine.c b/examples/paex_sine.c similarity index 100% rename from test/patest_sine.c rename to examples/paex_sine.c -- 2.43.0