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