Refactor object and library build, and only build PIC libraries when PIC_CFLAGS is defined

This commit is contained in:
Mike Hommey
2012-04-18 18:29:41 +02:00
committed by Jason Evans
parent 85221d5d75
commit 188da7c3f5
2 changed files with 41 additions and 36 deletions

View File

@@ -202,6 +202,7 @@ lib="lib"
DSO_LDFLAGS='-shared -Wl,-soname,$(@F)'
RPATH='-Wl,-rpath,$(1)'
SOREV='$(SO).$(REV)'
PIC_CFLAGS='-fPIC -DPIC'
dnl Heap profiling uses the log(3) function.
LIBS="$LIBS -lm"
@@ -287,6 +288,7 @@ AC_SUBST([exe])
AC_SUBST([lib])
AC_SUBST([DSO_LDFLAGS])
AC_SUBST([SOREV])
AC_SUBST([PIC_CFLAGS])
JE_COMPILABLE([__attribute__ syntax],
[static __attribute__((unused)) void foo(void){}],