pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = poly2tri-c.pc
+P2TC_publicdir = $(includedir)/poly2tri-c-$(P2TC_API_VERSION)
+export P2TC_publicdir
+P2TC_public_HEADERS =
+
lib_LTLIBRARIES = libpoly2tri-c-@P2TC_API_VERSION@.la
libpoly2tri_c_@P2TC_API_VERSION@_la_LIBADD = p2t/libp2tc.la refine/libp2tc-refine.la render/libp2tc-render.la
libpoly2tri_c_@P2TC_API_VERSION@_la_SOURCES =
-
noinst_LTLIBRARIES = libp2tc.la
+P2TC_P2T_publicdir = $(P2TC_publicdir)/p2t
+export P2TC_P2T_publicdir
+P2TC_P2T_public_HEADERS = poly2tri.h
+
libp2tc_la_LIBADD = common/libp2tc-common.la sweep/libp2tc-sweep.la
libp2tc_la_SOURCES =
noinst_LTLIBRARIES = libp2tc-common.la
libp2tc_common_la_SOURCES = cutils.h poly2tri-private.h shapes.c shapes.h utils.c utils.h
+
+P2TC_P2T_COMMON_publicdir = $(P2TC_P2T_publicdir)/common
+P2TC_P2T_COMMON_public_HEADERS = cutils.h poly2tri-private.h shapes.h utils.h
noinst_LTLIBRARIES = libp2tc-sweep.la
libp2tc_sweep_la_SOURCES = advancing_front.c advancing_front.h cdt.c cdt.h sweep.c sweep_context.c sweep_context.h sweep.h
+
+P2TC_P2T_SWEEP_publicdir = $(P2TC_P2T_publicdir)/sweep
+P2TC_P2T_SWEEP_public_HEADERS = advancing_front.h cdt.h sweep_context.h sweep.h
noinst_LTLIBRARIES = libp2tc-refine.la
libp2tc_refine_la_SOURCES = bounded-line.c bounded-line.h cdt.c cdt.h circle.c circle.h cluster.c cluster.h delaunay-terminator.c delaunay-terminator.h edge.c edge.h line.c line.h rmath.c rmath.h mesh.c mesh.h point.c point.h pslg.c pslg.h refine.h triangle.c triangle.h triangulation.h utils.c utils.h vector2.c vector2.h visibility.c visibility.h
+
+P2TC_REFINE_publicdir = $(P2TC_publicdir)/refine
+P2TC_REFINE_public_HEADERS = bounded-line.h cdt.h circle.h cluster.h delaunay-terminator.h edge.h line.h mesh.h point.h pslg.h refine.h rmath.h triangle.h triangulation.h utils.h vector2.h visibility.h
noinst_LTLIBRARIES = libp2tc-render.la
libp2tc_render_la_SOURCES = mesh-render.c mesh-render.h svg-plot.c svg-plot.h
+
+P2TC_RENDER_publicdir = $(P2TC_publicdir)/render
+P2TC_RENDER_public_HEADERS = mesh-render.h svg-plot.h