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