]> Repos - portaudio/commitdiff
Experiment with moving example code into its own folder.
authorphilburk <philburk@0f58301d-fd10-0410-b4af-bbb618454e57>
Wed, 7 Sep 2011 23:54:04 +0000 (23:54 +0000)
committerphilburk <philburk@0f58301d-fd10-0410-b4af-bbb618454e57>
Wed, 7 Sep 2011 23:54:04 +0000 (23:54 +0000)
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
examples/paex_sine.c [moved from test/patest_sine.c with 100% similarity]

index 3f3fb4a78a14f3ff610655c479c89291da2e7184..c1b3754557be20d3e5c4e3af3a2cabcda4994667 100644 (file)
@@ -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)
similarity index 100%
rename from test/patest_sine.c
rename to examples/paex_sine.c