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

Read numbers form user and place them in array, Read numbers form user and ...

Read numbers form user and place them in array: Program is to read a group numbers of numbers form user and place them in array type of float and sort them void sort(floa

What do you meant by linear search, Question : (a) One of the most co...

Question : (a) One of the most common sorting techniques we have in programming is the ‘Bubble Sort'. This technique will be used to sort an array of elements in ascending or

Which one would you prefer - a macro or a function, Which one would you pre...

Which one would you prefer - a macro or a function? Actually it depends on the purpose of program! - In case of macros, corresponding code is inserted directly into your sou

Saha, find the minimum total number of shelves

find the minimum total number of shelves

Program to find shortest path between two nodes, Ques.Implement a c/c++ pro...

Ques.Implement a c/c++ program to find a shortest path between two nodes in a network?network should be taken as an adjacency matrix.

C program for create matrices , C Program for CREATE MATRICES #include...

C Program for CREATE MATRICES #include stdio.h> #include conio.h> void main() {           int a[10][10],rw=0,clm=0,i=0,j=0;           char s=' ';           c

Expected output of the program - c program, Expected output of the program:...

Expected output of the program: 1. Consider the following programs. For each, indicate whether the program is correct. If yes, what is the expected output? If not, what is the

Algorithm, Sine function computation

Sine function computation

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