Sponsored Content
Homework and Emergencies Homework & Coursework Questions Create Makefile from source files Post 302954231 by pintu1228 on Saturday 5th of September 2015 06:03:56 PM
Old 09-05-2015
I got most of working, just need to ask a question.

I am trying to create the gq.o file but the bb.h is located in another directory with assign1. So its like /assign1/includes/bb.h, how do I define it correctly.

it keeps giving an error saying No rule to make target 'I/assign1/includes/', needed by gq.o. Stop


Thanks
 

10 More Discussions You Might Find Interesting

1. Programming

about create Makefile

hello! i want to create a Makefile on the freebsd 4.5,so i vi the hello.c #include int main(int argc, char** argv) { printf(''Hello, GNU!\n''); return 0; } #autoscan #cp configure.scan configure.in #vi configure.in modify:AC_OUTPUT AC_OUTPUT(Makefile) #aclocal #autoconf... (0 Replies)
Discussion started by: mzp
0 Replies

2. Programming

Makefile compilation Error -Unable to create executable

Hi , While trying to compile a PRO*C code on unix using makefile i get the following errors. i am now working on a 10g migration (from 8i) ... these makefile perfectly work in previous version. ld: fatal: file... (7 Replies)
Discussion started by: sivalives
7 Replies

3. UNIX for Dummies Questions & Answers

create raidctl mirror with mounted source parition

I am mirroring a single partition drive with raidctl. The source partition was mounted when I created the mirror with raidctl -c c1t1d0 c1t3d0. The source disk was defined with s2 and s6 only. I didn't think to umount it first. Is there a problem with that? (2 Replies)
Discussion started by: csgonan
2 Replies

4. Shell Programming and Scripting

Makefile cant create new install path

..... (2 Replies)
Discussion started by: mercury
2 Replies

5. Shell Programming and Scripting

ksh script to create a generic csv file from different source formats

Hi all, I have a requirement to create a "superset" file out of a number of different sources with some different and some same columns. We intend to have a manually updateable SuperSetCols.csv which would look like "ColA","ColB","ColC","ColD","ColE","ColF","ColG" so someday we may add... (3 Replies)
Discussion started by: Leedor
3 Replies

6. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

7. Shell Programming and Scripting

automake does not create Makefile.in

hi all, I have written a simple C program hello.c and a Makefile.ac but when i try to run automake it does not create Makefile.in hence I am not able to run ./configure command in my directory. Following are the containts of my prog. hello.c -------- Code: #include<stdio.h> main() {... (0 Replies)
Discussion started by: useless79
0 Replies

8. Linux

Create a bootable PXE image from build kernel source code

Hi, Can i just ask how I can create a bootable PXE image from the built kernel source. What files do I need to get? Thanks! (1 Reply)
Discussion started by: h0ujun
1 Replies

9. UNIX for Dummies Questions & Answers

Create a tgz from source FreeBSD

Hello, i'm having a problem here with FreeBSD 9.2 . I've created a directory and downloaded the latest ntp-4.2.8p1-beta2 from ntp.org. Untar then into the directory and then ./configure all went OK. Then i had to modify some parameters in the config.h created with ./configure . Then make... (2 Replies)
Discussion started by: Board27
2 Replies

10. Programming

Makefile instructions to create directories (CentOS7 , GNU Make 3.82)

Hello, My makefiles are set up to generate an environment specific build directory based on the local configuration and some values passed to make. It generally looks like, # compilers, may be passed to make CC++ = g++ FCOMP = gfortran # version of program, may be passed to make ver =... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
mkmf(1) 						      General Commands Manual							   mkmf(1)

NAME
mkmf - make a makefile SYNOPSIS
makefile] template] language] [macroname=value ...] DESCRIPTION
The command creates a makefile that informs the command how to construct and maintain programs and libraries (see make(1)). After gather- ing up all source code file names in the current working directory and inserting them into the makefile, scans source code files for included files and generates dependency information that is appended to the makefile. Source code files are identified by their file name suffixes. recognizes the following suffixes: C C++ FORTRAN Include files Pascal include files Lex or Lisp Object files Pascal Ratfor Assembler Yacc The command checks for an existing makefile before creating one. If no option is present, tries the makefiles and respectively. After the makefile has been created, arbitrary changes can be made using a text editor. can also be used to re-edit the macro definitions in the makefile, regardless of changes that may have been made since it was created. By default, creates a program makefile. To create a makefile that handles libraries, the option must be used. Make Requests Given a makefile created by recognizes the following requests: Compile and load a program or library. Remove all object and core files. Remove all files that can be regenerated. Update included file dependencies in a makefile. List the names of the source code files on standard output. Extract all object files from the library and place them in the same directory as the source code files. The library is not altered. Print an index of functions on standard output. Compile and load the program or library and move it to its destination directory. Print source code files on standard output. Create a tags file for the editor (see ex(1) and ctags(1)), for C, Pascal, and Fortran source code files. Recompile only if there are source code files that are newer than the program or library, link and install the program or library. Several requests can be given simultaneously. For example, to (1) compile and link a program, (2) move the program to its destination directory, and (3) remove any unnecessary object files, use: Macro Definitions understands the following macro definitions: C compiler flags. After searching for included files in the directory currently being processed, searches in directories named in com- piler options and then in the directory. Location of If the macro or environment variable is defined, searches for included files in instead of C++ compiler flags. After searching for included files in the directory currently being processed, searches in directories named in com- piler options and then in the directory, followed by the directory. Directory where the program or library is to be installed. List of included files external to the current directory. automatically updates this macro definition in the makefile if dependency information is being generated. Fortran compiler flags. After searching for included files in the directory currently being processed, searches in directories named in com- piler options, then in the directory. List of included files in the current directory. automatically updates this macro definition in the makefile. Installation program name. Link editor name. Link editor flags. Library name. This macro also implies the option. List of libraries needed by the link editor to resolve external references. Makefile name. List of object files. automatically updates this macro definition in the makefile. Program name. List of source code files. automatically updates this macro definition in the makefile. List of additional file name suffixes for to know about. List of included files found in the directory hierarchy. automatically updates this macro definition in the makefile if dependency information is being generated. If is omitted from the makefile, does not generate dependencies. Both these and any other macro definitions already within the makefile can be replaced by definitions on the command line in the form For example, to change the C compiler flags and the program name, type the following line: Note that macro definitions such as with blanks in them must be enclosed in double quote (") marks. Environment The environment is read by All variables are assumed to be macro definitions with the exception of and Environment variables are processed after command line macro definitions and the macro definitions in a makefile. The option forces the environment to override the macro def- initions in a makefile. File Name Suffixes can recognize additional file name suffixes, or ignore ones that it already recognizes, by specifying suffix descriptions in the macro def- inition. Each suffix description takes the form where t is a character indicating the contents of the file = source file, = object file, = header file, = executable file) and I is an optional character indicating the include syntax for header files = C syntax, = C syntax plus the addition of as a standard search directory, = Fortran and Ratfor syntax, = Pascal syntax). The following list shows the default con- figuration for C C++ Fortran Include files Pascal include files Lex or Lisp Object files Pascal Ratfor Assembler Yacc For example, to change the object file suffix to undefine the Pascal include file suffix, and prevent Fortran files from being scanned for included files, the macro definition could be: Include Statement Syntax The syntax of include statements for C, C++, Fortran, and Pascal source code are of the form: C/C++: where must be the first character in the line. Fortran: where must be the first character in the line. Alternatively, the can be omitted if the include statement starts in column 7. In either case the trailing can be omitted. Pascal: where must be the first character in the line and the trailing is optional. User-defined Templates If cannot find a makefile within the current directory, it normally uses one of the standard makefile templates, or in unless the user has alternative or template files in a directory where is the absolute path name of the directory assigned to the environment variable. Options recognizes the following options: Include source files beginning with a in the makefile. Suppress `` makefile message. Turn off scanning of source code for files. Old dependency information is left untouched in the makefile. Environment variables override macro definitions within makefiles. Specify an alternative makefile file name. The default file name is Prompt the user for the name of the program or library and the directory where it is to be installed. If a carriage-return is typed in response to each of these queries, assumes that the default program name is or the default library name is and the destination directory is the current directory. Force the makefile to be a library makefile. Specify an alternative makefile template path name. The path name can be relative or absolute. Specify an alternative language-specific makefile template. The default language is C and the corresponding program and library makefile templates are and respectively. looks for these templates in or DIAGNOSTICS
Exit status 0 is normal. Exit status 1 indicates an error. WARNINGS
The name of the makefile is included as a macro definition within the makefile and must be changed if the makefile is renamed. Since executable files are dependent on libraries, standard library abbreviations must be expanded to full path names within the macro def- inition in the makefile. Generated dependency information appears after a line in the makefile beginning with This line must not be removed, nor must any other information be inserted in the makefile below this line. The name of a program or library must not conflict with any predefined target names in a makefile. It is especially important to avoid the the name to prevent from recursively executing itself an infinite number of times. AUTHOR
was developed by the University of California, Berkeley. FILES
Standard program makefile template Standard library makefile template User-defined program makefile template User-defined library makefile template SEE ALSO
ar(1), ctags(1), ld(1), make(1). "Automatic Generation of Make Dependencies", Walden, K., vol. 14, no. 6, pp. 575-585, June 1984. mkmf(1)
All times are GMT -4. The time now is 08:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy