Fix for compile bug in Windows DS and library configure in linux (GS).
[rtaudio.git] / Makefile.in
index dfebb0ebb3028afa36095318782bbc35865e61a6..8a6b03bf5d14255db50575e4096e10be93a6f2fe 100644 (file)
@@ -2,43 +2,56 @@
 ### RtAudio library Makefile
 
 RM = /bin/rm
+LN = /bin/ln
 
-OBJECTS        = RtAudio.o
+OBJECTS        = RtAudio.o @objects@
 
-LIBRARY  = librtaudio.a
+STATIC = librtaudio.a
+SHARED = @sharedlib@
+RELEASE = 4.0.9
+MAJOR = 4
+LIBRARIES = $(STATIC) $(SHARED)
 
 CC       = @CXX@
 AR       = @AR@
 RANLIB   = @RANLIB@
 
-DEFS     = @debug@
-DEFS    += @audio_apis@
-CFLAGS   = @cflags@
-CFLAGS  += @warn@
+DEFS     = @CPPFLAGS@
+CFLAGS   = @CXXFLAGS@ -Iinclude -fPIC
 
-all : $(LIBRARY)
+all : $(LIBRARIES)
 
 tests:
        cd tests && $(MAKE) all
 
-$(LIBRARY): $(OBJECTS)
-       $(AR) ruv $(LIBRARY) $(OBJECTS)
-       ranlib $(LIBRARY)
+$(LIBRARIES): $(OBJECTS)
+       $(AR) ruv $(STATIC) $(OBJECTS)
+       ranlib $(STATIC)
+       $(CC) -fPIC @libflags@ $(OBJECTS) @LIBS@
+       $(LN) -s @sharedname@ $(SHARED)
+
+#      $(CC) -shared $(OBJECTS) -o $(SHARED) @LIBS@
 
 %.o : %.cpp
        $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@
 
+%.o : include/%.cpp
+       $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@
+
 clean : 
-       -rm -f $(LIBRARY)
-       -rm -f $(OBJECTS)
-       -rm -f *~
+       $(RM) -f $(LIBRARIES) @sharedname@ $(SHARED)*
+       $(RM) -f $(OBJECTS)
+       $(RM) -f *~
        cd tests && $(MAKE) clean
 
-distclean: clean
-       -rm -rf config.log 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
        cd tests && $(MAKE) distclean
 
 strip : 
-       strip $(LIBRARY)
-       ranlib $(LIBRARY)
+       strip $(LIBRARIES)
+       ranlib $(LIBRARIES)
        cd tests && $(MAKE) strip