| 1 |
# |
| 2 |
# Copyright (c) 2014-2026 Enrico M. Crisostomo |
| 3 |
# |
| 4 |
# This program is free software; you can redistribute it and/or modify it under |
| 5 |
# the terms of the GNU General Public License as published by the Free Software |
| 6 |
# Foundation; either version 3, or (at your option) any later version. |
| 7 |
# |
| 8 |
# This program is distributed in the hope that it will be useful, but WITHOUT |
| 9 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 10 |
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 11 |
# details. |
| 12 |
# |
| 13 |
# You should have received a copy of the GNU General Public License along with |
| 14 |
# this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 |
# |
| 16 |
|
| 17 |
pkgconfigdir = $(libdir)/pkgconfig |
| 18 |
pkgconfig_DATA = libfswatch.pc |
| 19 |
|
| 20 |
LIBFSWATCH_API_VERSION = @AM_LIBFSWATCH_API_VERSION@ |
| 21 |
|
| 22 |
# Prepare gettext-related symbols used by programs |
| 23 |
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_builddir) |
| 24 |
|
| 25 |
lib_LTLIBRARIES = libfswatch.la |
| 26 |
|
| 27 |
libfswatch_la_SOURCES = libfswatch/c/cevent.cpp |
| 28 |
libfswatch_la_SOURCES += libfswatch/c/libfswatch.cpp |
| 29 |
libfswatch_la_SOURCES += libfswatch/c/libfswatch_log.cpp |
| 30 |
libfswatch_la_SOURCES += libfswatch/c++/libfswatch_exception.cpp |
| 31 |
libfswatch_la_SOURCES += libfswatch/c++/event.cpp |
| 32 |
libfswatch_la_SOURCES += libfswatch/c++/filter.cpp |
| 33 |
libfswatch_la_SOURCES += libfswatch/c++/monitor.cpp |
| 34 |
libfswatch_la_SOURCES += libfswatch/c++/monitor_factory.cpp |
| 35 |
libfswatch_la_SOURCES += libfswatch/c++/poll_monitor.cpp |
| 36 |
libfswatch_la_SOURCES += libfswatch/c++/path_utils.cpp |
| 37 |
libfswatch_la_SOURCES += libfswatch/c++/string/string_utils.cpp |
| 38 |
libfswatch_la_SOURCES += libfswatch/gettext.h |
| 39 |
libfswatch_la_SOURCES += libfswatch/gettext_defs.h |
| 40 |
|
| 41 |
# Platform-dependent source files |
| 42 |
if USE_FSEVENTS |
| 43 |
libfswatch_la_SOURCES += libfswatch/c++/fsevents_monitor.cpp |
| 44 |
endif |
| 45 |
if USE_KQUEUE |
| 46 |
libfswatch_la_SOURCES += libfswatch/c++/kqueue_monitor.cpp |
| 47 |
endif |
| 48 |
if USE_FEN |
| 49 |
libfswatch_la_SOURCES += libfswatch/c++/fen_monitor.cpp |
| 50 |
endif |
| 51 |
if USE_INOTIFY |
| 52 |
libfswatch_la_SOURCES += libfswatch/c++/inotify_monitor.cpp |
| 53 |
endif |
| 54 |
if USE_FANOTIFY |
| 55 |
libfswatch_la_SOURCES += libfswatch/c++/fanotify_monitor.cpp |
| 56 |
endif |
| 57 |
if USE_WINDOWS |
| 58 |
if USE_CYGWIN |
| 59 |
libfswatch_la_SOURCES += libfswatch/c++/windows_monitor.cpp |
| 60 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_handle.cpp |
| 61 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_handle.hpp |
| 62 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_error_message.cpp |
| 63 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_error_message.hpp |
| 64 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_strings.cpp |
| 65 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_strings.hpp |
| 66 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_paths.cpp |
| 67 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_paths.hpp |
| 68 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_directory_change_event.cpp |
| 69 |
libfswatch_la_SOURCES += libfswatch/c++/windows/win_directory_change_event.hpp |
| 70 |
endif |
| 71 |
endif |
| 72 |
|
| 73 |
libfswatch_la_LDFLAGS = -version-info $(LIBFSWATCH_API_VERSION) |
| 74 |
libfswatch_la_LDFLAGS += @LTLIBINTL@ |
| 75 |
|
| 76 |
if OS_CYGWIN |
| 77 |
libfswatch_la_LDFLAGS += -no-undefined |
| 78 |
endif |
| 79 |
|
| 80 |
if USE_FSEVENTS |
| 81 |
libfswatch_la_LDFLAGS += -framework CoreServices |
| 82 |
endif |
| 83 |
|
| 84 |
# Define separate include directories for C and C++ headers. |
| 85 |
libfswatch_cdir = $(includedir)/libfswatch/c |
| 86 |
libfswatch_cppdir = $(includedir)/libfswatch/c++ |
| 87 |
|
| 88 |
# Distribute C headers. |
| 89 |
libfswatch_c_HEADERS = libfswatch/c/libfswatch.h |
| 90 |
libfswatch_c_HEADERS += libfswatch/c/libfswatch_types.h |
| 91 |
libfswatch_c_HEADERS += libfswatch/c/cevent.h |
| 92 |
libfswatch_c_HEADERS += libfswatch/c/cfilter.h |
| 93 |
libfswatch_c_HEADERS += libfswatch/c/cmonitor.h |
| 94 |
libfswatch_c_HEADERS += libfswatch/c/error.h |
| 95 |
libfswatch_c_HEADERS += libfswatch/c/libfswatch_log.h |
| 96 |
|
| 97 |
# Distribute C++ headers conditionally adding available backends. |
| 98 |
libfswatch_cpp_HEADERS = libfswatch/c++/monitor.hpp |
| 99 |
libfswatch_cpp_HEADERS += libfswatch/c++/monitor_factory.hpp |
| 100 |
libfswatch_cpp_HEADERS += libfswatch/c++/path_utils.hpp |
| 101 |
libfswatch_cpp_HEADERS += libfswatch/c++/string/string_utils.hpp |
| 102 |
if USE_FSEVENTS |
| 103 |
libfswatch_cpp_HEADERS += libfswatch/c++/fsevents_monitor.hpp |
| 104 |
endif |
| 105 |
if USE_KQUEUE |
| 106 |
libfswatch_cpp_HEADERS += libfswatch/c++/kqueue_monitor.hpp |
| 107 |
endif |
| 108 |
if USE_FEN |
| 109 |
libfswatch_cpp_HEADERS += libfswatch/c++/fen_monitor.hpp |
| 110 |
endif |
| 111 |
if USE_INOTIFY |
| 112 |
libfswatch_cpp_HEADERS += libfswatch/c++/inotify_monitor.hpp |
| 113 |
endif |
| 114 |
if USE_FANOTIFY |
| 115 |
libfswatch_cpp_HEADERS += libfswatch/c++/fanotify_monitor.hpp |
| 116 |
endif |
| 117 |
if USE_WINDOWS |
| 118 |
libfswatch_cpp_HEADERS += libfswatch/c++/windows_monitor.hpp |
| 119 |
endif |
| 120 |
libfswatch_cpp_HEADERS += libfswatch/c++/poll_monitor.hpp |
| 121 |
libfswatch_cpp_HEADERS += libfswatch/c++/filter.hpp |
| 122 |
libfswatch_cpp_HEADERS += libfswatch/c++/event.hpp |
| 123 |
libfswatch_cpp_HEADERS += libfswatch/c++/libfswatch_exception.hpp |