noinst_PROGRAMS = profile
profile_SOURCES = profile.c
-profile_CPPFLAGS = -I../libass
-profile_LDADD = ../libass/.libs/libass.a
+profile_CPPFLAGS = -I$(top_srcdir)/libass
+profile_LDADD = $(top_builddir)/libass/.libs/libass.a
profile_LDFLAGS = $(AM_LDFLAGS) -static
noinst_PROGRAMS = test
test_SOURCES = test.c
-test_CPPFLAGS = -I../libass
-test_LDADD = ../libass/libass.la
-test_LDFLAGS = $(AM_LDFLAGS) $(LIBPNG_LIBS)
+test_CPPFLAGS = -I$(top_srcdir)/libass
+test_LDADD = $(top_builddir)/libass/.libs/libass.a
+test_LDFLAGS = $(AM_LDFLAGS) $(LIBPNG_LIBS) -static