MKDEP(1)
π mkdep β construct Makefile dependency list β¨
okay bestie, so this is mkdep, and she lives in section 1 of the General Commands Manual. she's a little build-system fairy and honestly? she eats. π§
πΈ SYNOPSIS πΈ
mkdep [-ap] [-f file] [flags] file [...]
π¦ DESCRIPTION π¦
so here's the vibe: mkdep takes a bunch of flags meant for the C compiler plus a list of C source files, and it constructs a whole set of include file dependencies β and then it writes all of that into the file .depend. periodt. π
an example of how you'd use her in a Makefile might look like this:
CFLAGS= -O -I../include
SRCS= file1.c file2.c
depend:
mkdep ${CFLAGS} ${SRCS}
where the macro SRCS is the list of C source files, and the macro CFLAGS is the list of flags for the C compiler. iykyk. π
the options are as follows:
-aβ append to the output file, so that you can run multiplemkdep's from a singleMakefile. so many mkdeps, so little time, we love a group project. π«Ά-ffile β write the include file dependencies to file, instead of the default.depend. she's flexible like that. π-pβ causemkdepto produce dependencies of the form:
program: program.c
so that subsequent makes will produce program directly from its C module rather than using an intermediate .o module. this is useful for programs whose source is contained in a single module. one file, one moment, main character energy. π
π SEE ALSO π
π FILES π
.dependβ file containing list of dependencies
π HISTORY π
the mkdep command appeared in 4.3BSD-Tahoe. she's vintage, she's iconic, she's been serving since day one. β
and that's the whole page, bestie!! this was brought to you by the 4.2 Berkeley Distribution, dated June 6, 1993 β yeah she's an elder but she's still slaying, no cap πβ¨π¦
π¦ where this page comes from
- debian bookworm: bmake 20200710-15+b1
- debian trixie: bmake 20200710-17
- ubuntu jammy: bmake 20200710-15
- ubuntu noble: bmake 20200710-16
- ubuntu questing: bmake 20200710-17
- ubuntu resolute: bmake 20200710-17build1
- ubuntu stonking: bmake 20200710-17build1
- Copyright (c) 1987, 1990, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms