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