Release 4.0.12 tarball
[rtaudio.git] / Makefile.in
index 5429b773186b05e072030ebe4c06006ad5a39188..41685e5ffab731118a1851244f25d5b961e19644 100644 (file)
@@ -2,11 +2,14 @@
 ### RtAudio library Makefile
 
 RM = /bin/rm
+LN = /bin/ln
 
 OBJECTS        = RtAudio.o @objects@
 
 STATIC = librtaudio.a
-SHARED = librtaudio.so
+SHARED = @sharedlib@
+RELEASE = 4.0.12
+MAJOR = 4
 LIBRARIES = $(STATIC) $(SHARED)
 
 CC       = @CXX@
@@ -24,7 +27,9 @@ tests:
 $(LIBRARIES): $(OBJECTS)
        $(AR) ruv $(STATIC) $(OBJECTS)
        ranlib $(STATIC)
-       $(CC) -shared $(OBJECTS) -o $(SHARED) @LIBS@
+       $(CC) -fPIC @libflags@ $(OBJECTS) @LIBS@
+       $(LN) -sf @sharedname@ $(SHARED)
+       $(LN) -sf @sharedname@ $(SHARED).$(MAJOR)
 
 %.o : %.cpp
        $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@
@@ -33,13 +38,16 @@ $(LIBRARIES): $(OBJECTS)
        $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@
 
 clean : 
-       $(RM) -f $(LIBRARIES)
+       $(RM) -f $(LIBRARIES) @sharedname@ $(SHARED)*
        $(RM) -f $(OBJECTS)
        $(RM) -f *~
        cd tests && $(MAKE) clean
 
-distclean: clean
-       $(RM) -rf config.log config.status autom4te.cache Makefile rtaudio-config
+distclean:
+       $(RM) -f $(LIBRARIES) @sharedname@ $(SHARED)*
+       $(RM) -f $(OBJECTS)
+       $(RM) -f *~
+       $(RM) -rf config.log config.status autom4te.cache Makefile rtaudio-config librtaudio.pc
        cd tests && $(MAKE) distclean
 
 strip :