1.\" Copyright (c) 1987, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)mkdep.1 5.12 (Berkeley) 03/14/91 7.\" 8.Vx 9.Vx 10.Dd 11.Dt MKDEP 1 12.Os BSD 4.2 13.Sh NAME 14.Nm mkdep 15.Nd construct Makefile dependency list 16.Sh SYNOPSIS 17.Nm mkdep 18.Op Fl ap 19.Op Fl f Ar file 20.Op Ar flags 21.Ar file ... 22.Sh DESCRIPTION 23.Nm Mkdep 24takes a set of flags for the C compiler and a list 25of C source files as arguments and constructs a set of include 26file dependencies which are written into the file ``.depend''. 27An example of its use in a Makefile might be: 28.Pp 29.Ds I 30CFLAGS= -O -I../include 31SRCS= file1.c file2.c 32 33depend: 34 mkdep ${CFLAGS} ${SRCS} 35.De 36.Pp 37where the macro SRCS is the list of C source files and the macro 38CFLAGS is the list of flags for the C compiler. 39.Pp 40The options are as follows: 41.Tw Ds 42.Tp Fl a 43Append to the output file, 44so that multiple 45.Sf Nm mkdep \&'s 46may be run from a single Makefile. 47.Tp Fl f 48Write the include file dependencies to 49.Ar file , 50instead of the default ``.depend''. 51.Tp Fl p 52Cause 53.Nm mkdep 54to produce dependencies of the form: 55.Pp 56.Ds I 57program: program.c 58.De 59.Pp 60so that subsequent makes will produce 61.Ar program 62directly from its C module rather than using an intermediate 63.Pa \&.o 64module. 65This is useful for programs whose source is contained in a single 66module. 67.Tp 68.Sh SEE ALSO 69.Xr cc 1 , 70.Xr cpp 1 , 71.Xr make 1 72.Sh FILES 73.Dw .depend 74.Di L 75.Dp .depend 76list of dependencies 77.Sh HISTORY 78.Nm Mkdep 79appeared in the 4.3 Tahoe BSD release. 80