Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mkdep(1) [osx man page]

MKDEP(1)						    BSD General Commands Manual 						  MKDEP(1)

NAME
mkdep -- construct Makefile dependency list SYNOPSIS
mkdep [-ap] [-f file] [flags] file ... DESCRIPTION
mkdep takes a set of flags for the C compiler and a list of C source files as arguments and constructs a set of include file dependencies which are written into the file ``.depend''. An example of its use in a Makefile might be: 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. The options are as follows: -a Append to the output file, so that multiple mkdep's may be run from a single Makefile. -f Write the include file dependencies to file, instead of the default ``.depend''. -p Cause mkdep to 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. SEE ALSO
cc(1), cpp(1), make(1) FILES
.depend File containing list of dependencies. HISTORY
The mkdep command appeared in 4.3BSD-Tahoe. 4.2 Berkeley Distribution June 6, 1993 4.2 Berkeley Distribution

Check Out this Related Man Page

MKDEP(1)						    BSD General Commands Manual 						  MKDEP(1)

NAME
mkdep -- construct Makefile dependency list SYNOPSIS
mkdep [-ap] [-f file] [flags] file ... DESCRIPTION
The mkdep utility takes a set of flags for the C compiler and a list of C source files as arguments and constructs a set of include file dependencies which are written into the file ``.depend''. An example of its use in a Makefile might be: 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. The user has the ability to change the preprocessor and preprocessor options used. For instance, to use gcc as the preprocessor and to ignore system headers, one would use depend: env MKDEP_CPP="gcc -E" MKDEP_CPP_OPTS=-MM mkdep ${CFLAGS} ${SRCS} The options are as follows: -a Append to the output file, so that multiple mkdep's may be run from a single Makefile. -f Write the include file dependencies to file, instead of the default ``.depend''. -p Cause mkdep to 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. ENVIRONMENT
CC Specifies the C compiler to use. The specified compiler is expected to have options consistent with the GNU C compiler. MKDEP_CPP Specifies the preprocessor to use. The default is "${CC} -E". MKDEP_CPP_OPTS Specifies the non-CFLAGS options for the preprocessor. The default is "-M". FILES
.depend File containing list of dependencies. SEE ALSO
cc(1), cpp(1), make(1) HISTORY
The mkdep command appeared in 4.3BSD-Tahoe. BSD
June 6, 1993 BSD
Man Page

7 More Discussions You Might Find Interesting

1. Programming

Makefile across platforms

EXE=auto SRCS=auto.cpp debug.cpp OBJS=auto.o debug.o CXX=g++ #HOSTFLAG=-DLinux HOSTFLAG=-DSunOS # Do not use compiler optimizer -O as this may break the program # Use debug flag to enable the debug() function. If DEBUG is not # defined than the function debug() is set to void(),... (1 Reply)
Discussion started by: laila63
1 Replies

2. Programming

Makefile

I m using SUN Studiuo11 compiler.There is problem while building Makefile. I got error as dmake:fetal error command failed for target plz help me. (7 Replies)
Discussion started by: NamrataGurav
7 Replies

3. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

4. Programming

Makefile help

Hi, What I want to do is for make to reconstruct the target even if its dependencies have not changed. So, even if if the dependent files do not have a more recent timestamp, the commands are executed. The reason I want to do this.. 1)someone executes make on solaris. We have a solaris... (4 Replies)
Discussion started by: tantric
4 Replies

5. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

6. UNIX for Dummies Questions & Answers

Defining a new suffix rule in a Makefile

Hi everybody, I have a Makefile where a single suffix rule is defined: .SUFFIXES: .cpp .cpp.o: ${CXX} ${CXXFLAGS} -c -o $@ $< And I'd like to create another where an additional flag is added to compile in SMP. Right now, I have to do it like this: interface-smp.o:... (2 Replies)
Discussion started by: Zel2008
2 Replies

7. Programming

Makefile for building multiple programs

I have the following part of a makefile and want to simplify it using rules rather than having to code the same two blocks when I need ti build another program. An having difficulty doing it all: 1dvel2 1dvel 2dvel ... (8 Replies)
Discussion started by: kristinu
8 Replies