diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-11-13 16:16:47 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-11-13 16:42:49 +0100 |
commit | e158ebe08a0c40b28563378b3cde671cb00aa1c0 (patch) | |
tree | 8e08d7cb94195dd502c15751694828764356cc9d /build/linux | |
parent | 7b268a1f78ef6c0ec4445093dd38f1cb3474cc9e (diff) | |
download | astra-e158ebe08a0c40b28563378b3cde671cb00aa1c0.tar.gz astra-e158ebe08a0c40b28563378b3cde671cb00aa1c0.tar.bz2 astra-e158ebe08a0c40b28563378b3cde671cb00aa1c0.tar.xz astra-e158ebe08a0c40b28563378b3cde671cb00aa1c0.zip |
Add install-dev make target for installing headers/pkgconfig/library
Diffstat (limited to 'build/linux')
-rw-r--r-- | build/linux/Makefile.in | 43 | ||||
-rw-r--r-- | build/linux/configure.ac | 9 | ||||
-rw-r--r-- | build/linux/libastra.pc.in | 10 |
3 files changed, 55 insertions, 7 deletions
diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 13e1344..2129519 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -34,6 +34,8 @@ all: $(TARGETS) prefix=@prefix@ exec_prefix=@exec_prefix@ datarootdir=@datarootdir@ +includedir=@includedir@ +libdir=@libdir@ srcdir=@srcdir@ abs_top_builddir=@abs_top_builddir@ @@ -354,7 +356,7 @@ endif endif libastra.la: $(ALL_OBJECTS) - ./libtool --mode=link --tag=CXX $(LD) -rpath @libdir@ -o $@ $(LDFLAGS) $(LIBS) $+ + ./libtool --mode=link --tag=CXX $(LD) -rpath $(libdir) -o $@ $(LDFLAGS) $(LIBS) $+ %.o: %.cpp $(MKDIR) $(*D)/$(DEPDIR) @@ -435,9 +437,9 @@ distclean: clean rm -f $(srcdir)/configure Makefile install-libraries: libastra.la - $(INSTALL_SH) -m 755 -d @libdir@ - ./libtool --mode=install $(INSTALL_SH) -m 644 libastra.la @libdir@ - ./libtool --mode=finish @libdir@ + $(INSTALL_SH) -m 755 -d $(libdir) + ./libtool --mode=install $(INSTALL_SH) -m 644 libastra.la $(libdir) + ./libtool --mode=finish $(libdir) # ------------------------ @@ -535,8 +537,37 @@ else install-octave: endif +ifeq ($(install_type),module) + +install-dev: + @echo "install-dev is not compatible with the 'module' install type." + @echo "Please use 'prefix' or 'dir' instead." + +install-headers: + @echo "install-headers is not compatible with the 'module' install type." + @echo "Please use 'prefix' or 'dir' instead." + +else + +install-headers: + $(INSTALL_SH) -m 755 -d $(includedir) + $(INSTALL_SH) -m 755 -d $(includedir)/astra + $(INSTALL_SH) -m 755 -d $(includedir)/astra/cuda + $(INSTALL_SH) -m 755 -d $(includedir)/astra/cuda/2d + $(INSTALL_SH) -m 755 -d $(includedir)/astra/cuda/3d + $(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/*.h $(includedir)/astra + $(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/*.inl $(includedir)/astra + $(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/cuda/2d/*.h $(includedir)/astra/cuda/2d + $(INSTALL_SH) -m 644 $(srcdir)/../../include/astra/cuda/3d/*.h $(includedir)/astra/cuda/3d + +install-dev: install-libraries install-headers libastra.pc + $(INSTALL_SH) -m 755 -d $(libdir) + $(INSTALL_SH) -m 755 -d $(libdir)/pkgconfig/ + $(INSTALL_SH) -m 644 libastra.pc $(libdir)/pkgconfig/ +endif + -Makefile: $(srcdir)/Makefile.in config.status +Makefile libastra.pc: %: $(srcdir)/%.in config.status CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=$@ $(SHELL) ./config.status config.status: $(srcdir)/configure @@ -547,7 +578,7 @@ $(srcdir)/configure: $(srcdir)/configure.ac @echo "configure.ac has been changed. Regenerating configure script" cd $(srcdir) && $(SHELL) ./autogen.sh -.PHONY: all mex test clean distclean install install-libraries py install-python-site-packages install-python install-octave install-matlab-so install-octave-so +.PHONY: all mex test clean distclean install install-libraries py install-python-site-packages install-python install-octave install-matlab-so install-octave-so install-headers install-dev # don't remove intermediate files: .SECONDARY: diff --git a/build/linux/configure.ac b/build/linux/configure.ac index ac0d82f..cb478f7 100644 --- a/build/linux/configure.ac +++ b/build/linux/configure.ac @@ -135,6 +135,13 @@ fi AC_ARG_VAR(NVCCFLAGS, [CUDA nvcc flags]) +PKGCONFIG_CFLAGS_EXTRA= +if test x"$HAVECUDA" = xyes; then + PKGCONFIG_CFLAGS_EXTRA="-DASTRA_CUDA" +fi +AC_SUBST(PKGCONFIG_CFLAGS_EXTRA) + + AC_SUBST(HAVECUDA) AC_SUBST(LDFLAGS_CUDA) @@ -295,7 +302,7 @@ AC_SUBST(SAVED_CXXFLAGS) AC_SUBST(SAVED_NVCCFLAGS) AC_SUBST(SAVED_LDFLAGS) AC_SUBST(SAVED_LIBS) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile libastra.pc]) AC_OUTPUT echo diff --git a/build/linux/libastra.pc.in b/build/linux/libastra.pc.in new file mode 100644 index 0000000..d2bf554 --- /dev/null +++ b/build/linux/libastra.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libastra +Description: ASTRA Toolbox +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lastra +Cflags: -I${includedir} @PKGCONFIG_CFLAGS_EXTRA@ |