diff options
| -rw-r--r-- | Makefile.in | 21 | ||||
| -rw-r--r-- | librtaudio.pc.in | 2 |
2 files changed, 20 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in index 41685e5..5f41cc5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,7 +6,8 @@ LN = /bin/ln OBJECTS = RtAudio.o @objects@ -STATIC = librtaudio.a +LIBNAME = librtaudio +STATIC = $(LIBNAME).a SHARED = @sharedlib@ RELEASE = 4.0.12 MAJOR = 4 @@ -19,6 +20,8 @@ RANLIB = @RANLIB@ DEFS = @CPPFLAGS@ CFLAGS = @CXXFLAGS@ -Iinclude -fPIC +PREFIX = @prefix@ + all : $(LIBRARIES) tests: @@ -37,6 +40,18 @@ $(LIBRARIES): $(OBJECTS) %.o : include/%.cpp $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $@ +install: + install --mode=755 $(STATIC) $(PREFIX)/lib/ + install --mode=755 @sharedname@ $(PREFIX)/lib/ + $(LN) -sf @sharedname@ $(PREFIX)/lib/$(SHARED) + $(LN) -sf @sharedname@ $(PREFIX)/lib/$(SHARED).$(MAJOR) + install --mode=644 $(LIBNAME).pc $(PREFIX)/lib/pkgconfig + install --mode=644 RtAudio.h RtError.h $(PREFIX)/include/ + +uninstall: + -@rm -vf $(patsubst %,$(PREFIX)/lib/%, $(LIBRARIES) $(SHARED).$(MAJOR) $(SHARED).$(RELEASE)) + -@rm -vf $(PREFIX)/lib/pkgconfig/$(LIBNAME).pc + clean : $(RM) -f $(LIBRARIES) @sharedname@ $(SHARED)* $(RM) -f $(OBJECTS) @@ -47,10 +62,12 @@ distclean: $(RM) -f $(LIBRARIES) @sharedname@ $(SHARED)* $(RM) -f $(OBJECTS) $(RM) -f *~ - $(RM) -rf config.log config.status autom4te.cache Makefile rtaudio-config librtaudio.pc + $(RM) -rf config.log config.status autom4te.cache Makefile rtaudio-config $(LIBNAME).pc cd tests && $(MAKE) distclean strip : strip $(LIBRARIES) ranlib $(LIBRARIES) cd tests && $(MAKE) strip + +.PHONY: clean distclean strip install uninstall diff --git a/librtaudio.pc.in b/librtaudio.pc.in index d7591a7..b4f3985 100644 --- a/librtaudio.pc.in +++ b/librtaudio.pc.in @@ -1,4 +1,4 @@ -prefix=/usr/local +prefix=@prefix@ exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include |
