111be35a1SLionel Sambuc# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:50 jmmv Exp $ 211be35a1SLionel Sambuc 311be35a1SLionel Sambuc.include <bsd.init.mk> 411be35a1SLionel Sambuc 511be35a1SLionel Sambuc.PATH: ${SRCDIR}/utils 611be35a1SLionel Sambuc 711be35a1SLionel SambucLIB= utils 811be35a1SLionel Sambuc 911be35a1SLionel SambucWARNS?= 2 1011be35a1SLionel Sambuc 1111be35a1SLionel SambucSRCS= datetime.cpp \ 1211be35a1SLionel Sambuc env.cpp \ 1311be35a1SLionel Sambuc memory.cpp \ 1411be35a1SLionel Sambuc passwd.cpp \ 1511be35a1SLionel Sambuc sanity.cpp \ 1611be35a1SLionel Sambuc stream.cpp \ 1711be35a1SLionel Sambuc units.cpp 1811be35a1SLionel Sambuc 19*84d9c625SLionel Sambuc.if defined(__MINIX) 20*84d9c625SLionel SambucCOPTS.memory.cpp+= -Wno-unused-function 21*84d9c625SLionel Sambuc.endif # defined(__MINIX) 22*84d9c625SLionel Sambuc 2311be35a1SLionel SambucSRCS+= cmdline/base_command.cpp \ 2411be35a1SLionel Sambuc cmdline/exceptions.cpp \ 2511be35a1SLionel Sambuc cmdline/globals.cpp \ 2611be35a1SLionel Sambuc cmdline/options.cpp \ 2711be35a1SLionel Sambuc cmdline/parser.cpp \ 2811be35a1SLionel Sambuc cmdline/ui.cpp \ 2911be35a1SLionel Sambuc cmdline/ui_mock.cpp 3011be35a1SLionel Sambuc 3111be35a1SLionel SambucSRCS+= config/exceptions.cpp \ 3211be35a1SLionel Sambuc config/keys.cpp \ 3311be35a1SLionel Sambuc config/lua_module.cpp \ 3411be35a1SLionel Sambuc config/nodes.cpp \ 3511be35a1SLionel Sambuc config/parser.cpp \ 3611be35a1SLionel Sambuc config/tree.cpp 3711be35a1SLionel Sambuc 3811be35a1SLionel SambucSRCS+= format/exceptions.cpp \ 3911be35a1SLionel Sambuc format/formatter.cpp 4011be35a1SLionel Sambuc 4111be35a1SLionel SambucSRCS+= fs/auto_cleaners.cpp \ 4211be35a1SLionel Sambuc fs/exceptions.cpp \ 4311be35a1SLionel Sambuc fs/lua_module.cpp \ 4411be35a1SLionel Sambuc fs/operations.cpp \ 4511be35a1SLionel Sambuc fs/path.cpp 4611be35a1SLionel Sambuc 4711be35a1SLionel SambucSRCS+= logging/operations.cpp 4811be35a1SLionel Sambuc 4911be35a1SLionel SambucSRCS+= process/child.cpp \ 5011be35a1SLionel Sambuc process/exceptions.cpp \ 5111be35a1SLionel Sambuc process/fdstream.cpp \ 5211be35a1SLionel Sambuc process/status.cpp \ 5311be35a1SLionel Sambuc process/system.cpp \ 5411be35a1SLionel Sambuc process/systembuf.cpp 5511be35a1SLionel Sambuc 5611be35a1SLionel SambucSRCS+= signals/exceptions.cpp \ 5711be35a1SLionel Sambuc signals/interrupts.cpp \ 5811be35a1SLionel Sambuc signals/misc.cpp \ 5911be35a1SLionel Sambuc signals/programmer.cpp 6011be35a1SLionel Sambuc 6111be35a1SLionel SambucSRCS+= sqlite/c_gate.cpp \ 6211be35a1SLionel Sambuc sqlite/database.cpp \ 6311be35a1SLionel Sambuc sqlite/exceptions.cpp \ 6411be35a1SLionel Sambuc sqlite/statement.cpp \ 6511be35a1SLionel Sambuc sqlite/transaction.cpp 6611be35a1SLionel Sambuc 6711be35a1SLionel SambucSRCS+= text/exceptions.cpp \ 6811be35a1SLionel Sambuc text/operations.cpp \ 6911be35a1SLionel Sambuc text/table.cpp \ 7011be35a1SLionel Sambuc text/templates.cpp 7111be35a1SLionel Sambuc 7211be35a1SLionel Sambuc# The subdirectories into which we recurse only exist to create the necessary 7311be35a1SLionel Sambuc# obj directories for the above SRCS declarations to work. We need to be able 7411be35a1SLionel Sambuc# to create object files of the form <subdirectory>/<file>.o, and therefore 7511be35a1SLionel Sambuc# the subdirectory must exist upfront. 7611be35a1SLionel Sambuc# 7711be35a1SLionel Sambuc# Note that there are source files of the same name in various subdirectories, 7811be35a1SLionel Sambuc# so we just cannot use .PATH to look for files in all of them at once. 7911be35a1SLionel Sambuc# 8011be35a1SLionel Sambuc# TODO: Would be nice if bsd.obj.mk (or whichever other module) did the right 8111be35a1SLionel Sambuc# thing here and just created these obj directories for us. Or, alternatively, 8211be35a1SLionel Sambuc# we could have every subdirectory Makefile create a temporary .a and we could 8311be35a1SLionel Sambuc# pull all the .a files together from here into libutil.a. 8411be35a1SLionel SambucSUBDIR= cmdline config format fs logging process signals sqlite text 8511be35a1SLionel Sambuc.for dir in ${SUBDIR} 8611be35a1SLionel Sambucclean-${dir} cleandir-${dir} includes-${dir}: .PHONY 8711be35a1SLionel Sambuc @true 8811be35a1SLionel Sambuc.endfor 8911be35a1SLionel Sambuc 9011be35a1SLionel Sambuc.include <bsd.subdir.mk> 9111be35a1SLionel Sambuc.include <bsd.lib.mk> 92