X-Git-Url: https://git.lttng.org/?p=ust.git;a=blobdiff_plain;f=Makefile.am;h=eb0c1b5dade6ca3bd6933e3f553a6239ac11eb02;hp=f8620dfbaee8dd89c56e18f3e96fe3553739dd16;hb=e7cc3e3415e0092809627e89168e1cba8b5800f6;hpb=e0baa9906b1c443228605a2b29c37b4bc004c61c diff --git a/Makefile.am b/Makefile.am index f8620df..eb0c1b5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1,24 @@ -SUBDIRS = libmarkers libtracectl libtracing hello libmallocwrap +ACLOCAL_AMFLAGS = -I config + +# The order here is tricky. SUBDIRS applies both to compilation and +# installation. Programs depending on the libs must be built after +# libust and '.' (that contains the linker script). However, '.' +# must be installed after libust so it can overwrite libust.so with +# the linker script. +SUBDIRS = snprintf libustcomm libust . tests libustinstr-malloc libustd ustd ustctl libustfork include doc + +EXTRA_DIST = libust.ldscript.in libust-initializer.c +dist_bin_SCRIPTS = usttrace + +ldscriptsdir = $(libdir) +ldscripts_DATA = libust.so libust-initializer.o + +CLEANFILES = $(ldscripts_DATA) ./tests/libust-initializer.Po + +libust.so: libust.ldscript.in + $(SED) -e "s@\@FORMAT\@@$(LIBFORMAT)@" < $< > $@ + +# It is very important to compile the initializer with PIC otherwise we +# may get obscure errors when linking to shared libraries. +libust-initializer.o: libust-initializer.c + $(CC) $(CFLAGS) -fno-strict-aliasing -fPIC -c -I$(top_srcdir)/include -o $@ $<