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.10 (Berkeley) 07/24/90 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 depend_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 25.Ar depend_file , 26or 27.Pa \&.depend 28by default. An example of its use in a Makefile 29might be: 30.Pp 31.Ds I 32CFLAGS= -O -DDEBUG -I../include -I. 33SRCS= file1.c file2.c 34 35depend: 36 mkdep ${CFLAGS} ${SRCS} 37.De 38.Pp 39where the macro SRCS is the list of C source files and the macro 40CFLAGS is the list of flags for the C compiler. 41.Pp 42Options: 43.Tw Ds 44.Tp Fl p 45.Nm mkdep 46produces dependencies of the form 47.Dq Li program: program.c 48so that subsequent makes will produce 49.Ar program 50directly from its C module rather than using an intermediate 51.Pa \&.o 52module. This is useful in directories that 53contain many programs, each of whose source is contained in a single 54C module. 55.Tp Fl a 56Append to the output file, 57so that multiple 58.Sf Nm mkdep \&'s 59may be run from a single Makefile. 60.Tp 61.Sh SEE ALSO 62.Xr cc 1 , 63.Xr cpp 1 , 64.Xr make 1 65.Sh HISTORY 66.Nm Mkdep 67appeared in the 4.3 Tahoe BSD release. 68