# $Id: Makefile.am 29839 2026-04-20 08:20:21Z yeti-dn $

libgwyddion3includedir = $(includedir)/gwyddion3/libgwyddion
pkgconfigdatadir = $(libdir)/pkgconfig

localedir = $(datadir)/locale

normal_public_headers = \
	$(srcdir)/arithmetic.h \
	$(srcdir)/brick.h \
	$(srcdir)/cdline.h \
	$(srcdir)/correct.h \
	$(srcdir)/correlation.h \
	$(srcdir)/cwt.h \
	$(srcdir)/dict.h \
	$(srcdir)/distance-transform.h \
	$(srcdir)/dwt.h \
	$(srcdir)/enum.h \
	$(srcdir)/enums.h \
	$(srcdir)/error-list.h \
	$(srcdir)/expr.h \
	$(srcdir)/extend.h \
	$(srcdir)/field.h \
	$(srcdir)/filters.h \
	$(srcdir)/fractals.h \
	$(srcdir)/gl-material.h \
	$(srcdir)/gradient.h \
	$(srcdir)/grains.h \
	$(srcdir)/grain-quantities.h \
	$(srcdir)/grain-value.h \
	$(srcdir)/gwyddion.h \
	$(srcdir)/gwyfdcurvepreset.h \
	$(srcdir)/nl-fitter.h \
	$(srcdir)/gwynlfitpreset.h \
	$(srcdir)/rand-gen-set.h \
	$(srcdir)/unit.h \
	$(srcdir)/value-format.h \
	$(srcdir)/hough.h \
	$(srcdir)/interpolation.h \
	$(srcdir)/inttrans.h \
	$(srcdir)/inventory.h \
	$(srcdir)/lawn.h \
	$(srcdir)/level.h \
	$(srcdir)/line.h \
	$(srcdir)/linestats.h \
	$(srcdir)/macros.h \
	$(srcdir)/math.h \
	$(srcdir)/mfm.h \
	$(srcdir)/nield.h \
	$(srcdir)/peaks.h \
	$(srcdir)/raw-data.h \
	$(srcdir)/resource.h \
	$(srcdir)/results.h \
	$(srcdir)/rgba.h \
	$(srcdir)/scatter.h \
	$(srcdir)/selection-axis.h \
	$(srcdir)/selection-ellipse.h \
	$(srcdir)/selection.h \
	$(srcdir)/selection-lattice.h \
	$(srcdir)/selection-line.h \
	$(srcdir)/selection-path.h \
	$(srcdir)/selection-point.h \
	$(srcdir)/selection-quad.h \
	$(srcdir)/selection-range.h \
	$(srcdir)/selection-rectangle.h \
	$(srcdir)/serializable-boxed.h \
	$(srcdir)/serializable.h \
	$(srcdir)/serializable-utils.h \
	$(srcdir)/serialize.h \
	$(srcdir)/deserialize.h \
	$(srcdir)/shape-fit-preset.h \
	$(srcdir)/shaped.h \
	$(srcdir)/simplefft.h \
	$(srcdir)/spectra.h \
	$(srcdir)/spline.h \
	$(srcdir)/stats.h \
	$(srcdir)/string-list.h \
	$(srcdir)/synth.h \
	$(srcdir)/threads.h \
	$(srcdir)/tip.h \
	$(srcdir)/tip-model.h \
	$(srcdir)/triangulation.h \
	$(srcdir)/utils.h \
	$(srcdir)/watershed.h \
	$(srcdir)/xy.h \
	$(srcdir)/xyz.h

libgwyddion3include_HEADERS = \
	$(normal_public_headers) \
	types.h \
	version.h

noinst_HEADERS = \
	fftw.h \
	internal.h \
	int-list.h \
	omp.h \
	serializable-internal.h

lib_LTLIBRARIES = libgwyddion3.la

pkgconfigdata_DATA = libgwyddion3.pc

if OS_MSWIN
no_undefined = -no-undefined
export_symbols = -export-symbols libgwyddion3.def
libgwyddion3_la_DEPENDENCIES = libgwyddion3.def
endif

# Must init
EXTRA_DIST = version.h.in libgwyddion3.pc.in
CLEANFILES = libgwyddion3.def $(dist_gir_DATA) $(typelib_DATA)
MAINTAINERCLEANFILES = version.h
BUILT_SOURCES = version.h

MKENUM_NAME = types
MKENUM_ID = GWY_TYPES
MKENUM_HFILES = $(normal_public_headers)
include $(top_srcdir)/build-aux/mkenum.mk

libgwyddion3.def: $(libgwyddion3_la_OBJECTS)
	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/build-aux/gen-library-def.py "$(EU_NM)" $(libgwyddion3_la_OBJECTS) >libgwyddion3.def

AM_CFLAGS = @COMMON_CFLAGS@ @FFTW3_CFLAGS@ @OPENMP_CFLAGS@
AM_CPPFLAGS = \
	-I$(top_srcdir) \
	-DG_LOG_DOMAIN=\"LibGwyddion\" \
	-DGWY_LIBDIR=\"$(libdir)\" \
	-DGWY_LIBEXECDIR=\"$(libexecdir)\" \
	-DGWY_DATADIR=\"$(datadir)\" \
	-DGWY_LOCALEDIR=\"$(localedir)\" \
	@OPENMP_CFLAGS@

# In following order do:
# Any code change     C:   R++: A
# Any iface change    C++: 0:   A
# Adding ifaces       C:   R:   A++
# Changing ifaces     C:   R:   0
#libversion = -version-info 0:0:0
libversion = -release @LIBRARY_RELEASE@
libgwyddion3_la_LDFLAGS = @BASIC_LIBS@ @FFTW3_LIBS@ @OPENMP_CFLAGS@ -export-dynamic $(no_undefined) $(export_symbols) $(libversion)

libname = Gwyddion
girlibname = $(libname)-$(GWY_VERSION_MAJOR).$(GWY_VERSION_MINOR)
INTROSPECTION_GIRS = $(girlibname).gir
INTROSPECTION_SCANNER_ARGS = \
	--identifier-prefix=Gwy \
	--symbol-prefix=gwy_ \
	-I$(top_srcdir) -I$(top_builddir) \
	$(GOBJECT_INTROSPECTION_SCANNER_FLAGS)
Gwyddion_@GWY_GIR_VERSION@_gir_LIBS = $(lib_LTLIBRARIES)
Gwyddion_@GWY_GIR_VERSION@_gir_FILES = $(libgwyddion3_la_SOURCES) $(libgwyddion3include_HEADERS) $(lib_LTLIBRARIES)
Gwyddion_@GWY_GIR_VERSION@_gir_INCLUDES = Gio-2.0
Gwyddion_@GWY_GIR_VERSION@_gir_PACKAGES = gio-2.0
girdir = $(datadir)/gir-1.0
typelibdir = $(libdir)/girepository-1.0
if HAVE_INTROSPECTION
dist_gir_DATA = $(INTROSPECTION_GIRS)
typelib_DATA = $(girlibname).typelib
endif

-include $(INTROSPECTION_MAKEFILE)

libgwyddion3_la_SOURCES = \
	arithmetic.c \
	brick.c \
	cdline.c \
	correct.c \
	correct--laplace.c \
	correlation.c \
	cwt.c \
	dict.c \
	distance-transform.c \
	dwt.c \
	enum.c \
	enums.c \
	error-list.c \
	expr.c \
	extend.c \
	field.c \
	filters.c \
	filters--convdeconv.c \
	filters--minmax.c \
	filters--small.c \
	fractals.c \
	gl-material.c \
	gradient.c \
	grains.c \
	grain-quantities.c \
	grain-value.c \
	gwyddion.c \
	gwyfdcurvepreset.c \
	nl-fitter.c \
	gwynlfitpreset.c \
	rand-gen-set.c \
	unit.c \
	value-format.c \
	hough.c \
	interpolation.c \
	inttrans.c \
	inventory.c \
	lawn.c \
	level.c \
	line.c \
	linestats.c \
	macros.c \
	math.c \
	math--inline.c \
	math--gridcheck.c \
	math--rank.c \
	mfm.c \
	nield.c \
	peaks.c \
	raw-data.c \
	resource.c \
	results.c \
	rgba.c \
	scatter.c \
	selection-axis.c \
	selection.c \
	selection-ellipse.c \
	selection-lattice.c \
	selection-line.c \
	selection-path.c \
	selection-point.c \
	selection-quad.c \
	selection-range.c \
	selection-rectangle.c \
	serializable-boxed.c \
	serializable.c \
	serializable-utils.c \
	serialize.c \
	deserialize.c \
	shape-fit-preset.c \
	shaped.c \
	simplefft.c \
	spectra.c \
	spline.c \
	stats.c \
	stats--acfpsdf.c \
	stats--entropy.c \
	stats--minkowski.c \
	stats--sum.c \
	string-list.c \
	synth.c \
	threads.c \
	tip.c \
	tip-model.c \
	triangulation.c \
	types.c \
	utils.c \
	utils--string.c \
	version.c \
	watershed.c \
	xy.c \
	xyz.c

clean-local:
	rm -f core.* *~

