Sponsored Content
Homework and Emergencies Homework & Coursework Questions Create Makefile from source files Post 302954239 by pintu1228 on Saturday 5th of September 2015 07:07:50 PM
Old 09-05-2015
Code:
output: fr.o vw.o ac.o pg.o gq.o
	g++ -o fr.o gq.o vw.o ac.o pg.o output

fr.o: fr.cc pg.h
	g++ -c fr.cc


vw.o: vw.cc ac.h
	g++ -c vw.cc


ac.o: ac.cc ac.h pg.h
	g++ -c ac.cc


pg.o: pg.cc pg.h
	g++ -c pg.cc


gq.o: gq.cc ac.h -I/assign1/includes bb.h	
	g++ -c gq.cc

clean:
	-rm *.o output

The gq.cc file has include "bb.h". The bb.h file is located in a sub directory under the main directory assign1.

---------- Post updated at 06:07 PM ---------- Previous update was at 06:04 PM ----------

the whole directory location is /home/turing/z1755294/assign1/assign1/includes/bb.h

the 2nd assign1 is where the other source files and header files are located.

The includes directory is what I am trying to accomplish for the gq.o
 

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
wml::mod::MakeMaker(3)						     EN Tools						    wml::mod::MakeMaker(3)

NAME
wml::mod::MakeMaker - A Makefile generator SYNOPSIS
#!wml -o Makefile #use wml::mod::MakeMaker <write-makefile [attributes]> DESCRIPTION
This include file provides an easy way to write a Makefile to distribute your own WML modules. It is inspired by the "ExtUtils::MakeMaker" Perl module. Default targets make all This is the default target. It will build all include files and their documentation. make install Install include files and documentation in the locations given by ``wml -V2''. make clean Remove files generated by make. make distclean Like make clean, plus remove the Makefile too. make dist Build a distribution. Should only be used by the module maintainer. If there is a MANIFEST file, then the list of files to include is taken from this file. Otherwise the tarball contains all source files, plus MakeMaker.wml, Makefile.wml, shtool and README if these files exist. Overriding default targets To build the Makefile, all targets are put in separate buffers during pass 3, and those buffers are diverted by pass 5. You can override this defaukt target by redefining buffer contents. Buffer names are explicit: MK_ALL MK_INSTALL MK_CLEAN MK_DISTCLEAN MK_CONFIG MK_RELEASE Defining new targets The MK_USER is empty and devoted to this task. ATTRIBUTES
The first three attributes are mandatory. package The name of the package version Its version number modules List of modules to build and install. This is a space separated list of filenames. Modules should reside in a sub-directory to be compliant with actual file hierarchy. For instance, the declaration modules="math/log.tmpl math/exp.tmpl" tells that after compilation, there are two modules which are "math/log.tmpl" and "math/exp.tmpl". This modules will be installed to "LibDir/include/math/log.tmpl" and "LibDir/include/math/exp.tmpl". These modules will then be called in a WML file by #use tmpl::math::log #use tmpl::math::exp Source files for these modules are obtained by replacing the suffix by .src. src-ext Defines an alternate suffix for the source files. man-ext Section number of the manual in which man files are put. Default is 3. extradistfiles Space separated list of files to include in a distribution. By default, all source files plus MakeMaker.wml, Makefile.wml, README and shtool are included in a distribution. EXAMPLE
<write-makefile package="log" version="3.14" modules="math/log.tmpl" source-ext="exp" > This will build the tmpl::math::log include module from the math/log.exp source file. This source file will also produce the tmpl::math::log(3) manpage. NOTES
Please do _not_ use a ".wml" suffix for your modules, they should be reserved for official WML modules shipped with WML. You may instead put your initials or anything else. AUTHOR
Denis Barbier barbier@engelschall.com REQUIRES
Internal: P1, P2, P3, P5 External: -- EN Tools 2014-04-16 wml::mod::MakeMaker(3)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy