Produce an executable file, C/C++ Programming

Assignment Help:

Requirements

  • Create a "makefile" that will manage the construction of a program
  • The name of the makefile must be: makefile
  • The make file must produce an executable file. The name of the executable file must be:

myProgram

  • Use the g++ compiler (This is the C++ compiler from our friends at GNU. It is on Einstein)
  • Base the makefile on the source files listed below.
  • The makefile and the source files must be located in $HOME/itec400/homework
  • Make sure the permissions on the your itec400 directory are 705
  • Make sure the permissions on your make file and your source files are 705

Source files

Create the following 5 files under your "homework" directory:

Source File 1: main.cpp

#include "employee.h"

#include "address.h"

int main()

{

printf("program works\n");

}

Source File 2: employee.cpp

#include "address.h"

Source File 3: address.cpp

#include

Source File 4: employee.h

#ifndef EMPLOYEE_H

#define EMPLOYEE_H

#endif

Source File 5: address.h

#ifndef ADDRESS_H

#define ADDRESS_H

#include

#endif

Testing

The script "test_build.sh" is utilized to invoke the "make" command. You can obtain a copy "test_build.sh" at the following location:

https://cs.franklin.edu/~dandrear/itec400/Misc/test_build.sh If you have written your

"makefile" properly, execution of the test_build.sh script should generate the following output:

1. touch everything - everything should build

g++ -c main.cpp

g++ -c address.cpp

g++ -c employee.cpp

g++ -o myProgram main.o address.o employee.o

2. touch nothing - nothing should build

make: 'myProgram' is up to date.

3. touch address.h - main and employee should build

g++ -c main.cpp

g++ -c employee.cpp

g++ -o myProgram main.o address.o employee.o

4. touch main.cpp - only main.o should build

g++ -c main.cpp

g++ -o myProgram main.o address.o employee.o

5. touch employee.cpp - only employee.o should build

g++ -c employee.cpp

g++ -o myProgram main.o address.o employee.o

6. touch address.cpp - only address.o should build

g++ -c address.cpp

g++ -o myProgram main.o address.o employee.o

Remove myProgram and all object files (.o)


Related Discussions:- Produce an executable file

Addition in a existing c++ unification algorithm, Addition in a existing c+...

Addition in a existing c++ unification algorithm Project Description: I have a existing code for a algorithm and need to add two modules into it, it is a unification algorith

Asset pricing project, In the final project assignment you are asked to dev...

In the final project assignment you are asked to develop an OOP C++ class hierarchy for derivative pricing, using the binomial tree and Black-Scholes option pricing methods. You wi

Simple object-oriented program, This assignment is to be undertaken individ...

This assignment is to be undertaken individually - no group work is permitted. Background information This assignment is an exercise in simple object-oriented programming and, acco

Programing project, Hello, Do you have any idea for programming project to...

Hello, Do you have any idea for programming project to simulate a network attack (threat) mechanism or a defense mechanism. Can I get some suggestions for this. Please include th

FlipFlaps fltk project, The project is to design and write a C++11/FLTKgame...

The project is to design and write a C++11/FLTKgame program with a graphical user interface.The game is based on "pancake sorting," as described at http://en.wikipedia.org/wiki/P

Sorted directory - c++ program, Sorted directory - C++ program: Write ...

Sorted directory - C++ program: Write a program in c to sorting a directory. int main( int argc, char *argv[] ) {     if( argc 3 )         {         cerr

Define structures in c++, Structures A structure is a user-defined data...

Structures A structure is a user-defined data type, which may have different data types as its members. Creating a structure is a two-part process. First, a structure template

Wap for basic salary of employees & calculate net salary, WAP TO ACCEPT THE...

WAP TO ACCEPT THE BASIC SALARY OF EMPLOYEES & CALCULATE NET SALARY   #include stdio.h> #include conio.h>   void main() {                    float Basi

In which condition a template a better solution than a base , In which cond...

In which condition a template a better solution than a base class? A: While you are designing a generic class to contain or manage objects of other types, while the format & beh

Main program to test the basic operations, The Main program is slightly mor...

The Main program is slightly more complicated and you need to think about the I/O process. First of all, for most applications you do not call the low level routines GetChar and P

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd