xref: /netbsd-src/external/bsd/kyua-cli/lib/utils/Makefile (revision ba65fde2d7fefa7d39838fa5fa855e62bd606b5e)
1# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:50 jmmv Exp $
2
3.include <bsd.init.mk>
4
5.PATH:		${SRCDIR}/utils
6
7LIB=		utils
8
9WARNS?=		2
10
11SRCS=		datetime.cpp \
12		env.cpp \
13		memory.cpp \
14		passwd.cpp \
15		sanity.cpp \
16		stream.cpp \
17		units.cpp
18
19SRCS+=		cmdline/base_command.cpp \
20		cmdline/exceptions.cpp \
21		cmdline/globals.cpp \
22		cmdline/options.cpp \
23		cmdline/parser.cpp \
24		cmdline/ui.cpp \
25		cmdline/ui_mock.cpp
26
27SRCS+=		config/exceptions.cpp \
28		config/keys.cpp \
29		config/lua_module.cpp \
30		config/nodes.cpp \
31		config/parser.cpp \
32		config/tree.cpp
33
34SRCS+=		format/exceptions.cpp \
35		format/formatter.cpp
36
37SRCS+=		fs/auto_cleaners.cpp \
38		fs/exceptions.cpp \
39		fs/lua_module.cpp \
40		fs/operations.cpp \
41		fs/path.cpp
42
43SRCS+=		logging/operations.cpp
44
45SRCS+=		process/child.cpp \
46		process/exceptions.cpp \
47		process/fdstream.cpp \
48		process/status.cpp \
49		process/system.cpp \
50		process/systembuf.cpp
51
52SRCS+=		signals/exceptions.cpp \
53		signals/interrupts.cpp \
54		signals/misc.cpp \
55		signals/programmer.cpp
56
57SRCS+=		sqlite/c_gate.cpp \
58		sqlite/database.cpp \
59		sqlite/exceptions.cpp \
60		sqlite/statement.cpp \
61		sqlite/transaction.cpp
62
63SRCS+=		text/exceptions.cpp \
64		text/operations.cpp \
65		text/table.cpp \
66		text/templates.cpp
67
68# The subdirectories into which we recurse only exist to create the necessary
69# obj directories for the above SRCS declarations to work.  We need to be able
70# to create object files of the form <subdirectory>/<file>.o, and therefore
71# the subdirectory must exist upfront.
72#
73# Note that there are source files of the same name in various subdirectories,
74# so we just cannot use .PATH to look for files in all of them at once.
75#
76# TODO: Would be nice if bsd.obj.mk (or whichever other module) did the right
77# thing here and just created these obj directories for us.  Or, alternatively,
78# we could have every subdirectory Makefile create a temporary .a and we could
79# pull all the .a files together from here into libutil.a.
80SUBDIR=		cmdline config format fs logging process signals sqlite text
81.for dir in ${SUBDIR}
82clean-${dir} cleandir-${dir} includes-${dir}: .PHONY
83	@true
84.endfor
85
86.include <bsd.subdir.mk>
87.include <bsd.lib.mk>
88