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

Xmugler, #solution for decode the code for smuglers

#solution for decode the code for smuglers

Describe the behaviour of procedure, Observe that our model of evaluation a...

Observe that our model of evaluation allows for combinations whose operators are compound expressions. (a) Use this observation to describe the behavior of the following procedu

Program is to find the area of room, Program is to find the area of room: ...

Program is to find the area of room: Program is to find the area of room with default values using classes & object class room   {   private:     int len;     i

Explain about the constants in c language, Explain about the Constants in c...

Explain about the Constants in c language? The Constants in C refer to fixed values that don't change during the execution of a program. C has four fundamental types of constan

Program to Find the Factorial of a Given Number, Program1: Write a progr...

Program1: Write a program to find the factorial of a given number. The input is user given. Final output is printed out on to the screen. Program2: Write a program to gene

Super ASCII String Cost, A string S is said to be "Super ASCII", if it cont...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Array, Assigning value to individual elements in array

Assigning value to individual elements in array

#otto cycle, To get the efficiency of Otto cycle by C/C++.

To get the efficiency of Otto cycle by C/C++.

Write a program that illustrate command line parameters, Write a Program th...

Write a Program that illustrate Command Line Parameters? main(int argc, char *argv[]) { int i; for(i = 0; i printf("arg %d: %s\n", i, argv[i]); return 0; }

For loop, write a c++ program for the sum of 10 numbers and print out the a...

write a c++ program for the sum of 10 numbers and print out the average

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