Exam Study - 2007.

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions Exam Study - 2007.
# 1  
Old 06-19-2011
Exam Study - 2007.

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:

Im unsure how the MakeFile works any help would be great. This is a past exam that was held at the uni 2007. So its is not an assignment just a guide to what i need to learn any help would be great.

Thanks

2. Relevant commands, code, scripts, algorithms:

QUESTION 4 (20 marks)
Consider the following Makefile:
Code:
1        # Makefile for my application
2
3        CC=gcc
4
5        source= main.c getSales.c processSales.c
6
7        objects=$(source:.c=.o)
8
9        myapp: $(objects)
10             $(CC) -o myapp $(objects)
11
12       clean:
13       /bin/rm *.o * ̃ myapp
14
15       PHONY: clean
16
17       main.o: defs.h processSales.h
18       getSales.o: defs.h processSales.h
19       processSales.o: processSales.h

(a) Assuming initially that only the *.c and *.h files exist, what command(s) will be executed when
the command make myapp is run?
(4 marks)
(b) What is the effect of the following command?
make -n
(2 marks)
(c) What is the effect of the following command?
make clean
(2 marks)
(d) Explain line 15 below:
PHONY: clean
(2 marks)
(e) The make program has implicit rules that allow it to recognise and use RCS tools. Assume
that you have moved all the source files into an RCS repository so that only the makefile and
the RCS repository exist in the directory. What commands will be executed now if make is
run?
(4 marks)
(f) What extra commands need to be added to the clean target so that source files will be
(possibly) saved in the RCS repository when the command make clean is run?
(2 marks)
Page 6 of 7

PAGE 7
(g) Now, assume that the functionality of myapp has been expanded with a new function
sort.c which has a header file sort.h needed by main.c and sort.c. Rewrite the
makefile to reflect these changes.

3. The attempts at a solution (include all code and scripts):

I have no attempts as i missed the lecture that was on and i have googled it but cant find enough to get the hang of it.

4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

USQ - Australia - CSC2408 - Zhongwei Zhang

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

Last edited by pludi; 06-19-2011 at 10:29 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Red Hat

Would like to study and take rh system admin exam.

hello, when the times comes where do I schedule for the linux system admin exam? I have taken exams before through vue or prometric I did not see rh system admin exam on either site? any feedback would be helpful such as cost? how many test is it one or two? is the comptia linux+ just as recognized... (3 Replies)
Discussion started by: arcolinux
3 Replies

2. Shell Programming and Scripting

Displaying every date since 2007

Hi, I need to write a script that displays every date from 01/01/2007 to 03/31/2010 in the format mm/dd/yyyy. There doesn't seem to be a "datecalc" command on my system. Any inputs? Thanks, (4 Replies)
Discussion started by: 17amrut29
4 Replies

3. What is on Your Mind?

The Switch to DST 2007 --- How Did It Go?

We have been discussing the 2007 changes to DST (Daylight Saving Time) for some time now. We hope that everything went well. But did it? Let us know by voting or by posting your experiences here. The poll will automatically close in 45 days. (6 Replies)
Discussion started by: Perderabo
6 Replies

4. Solaris

US timezone changes Mar 2007

Hi As per Suns guide, I have installed the 2 patches that are required to prepare for the US DST change. The first patch updates the zoneinfo database in /usr/share/lib/zoneinfo and I can test that the patch has worked by running the following command zdump -v US/Eastern | grep 2007 The... (5 Replies)
Discussion started by: hcclnoodles
5 Replies

5. Solaris

2007 timezone patches...

could sun make this more complex? http://sunsolve.sun.com/search/document.do?assetkey=1-26-102775-1 I think I need a 2nd cup to identify what patches I need to address the 2007 timezone changes... manny (2 Replies)
Discussion started by: mr_manny
2 Replies

6. Solaris

Solaris 9 Exam 310-014 & 310-015 Can anyone recommend some good study guides?

Hello, I'm going to be studying for my Solaris 9 System Administrator Certification and wondered if anyone had taken the exams and could recommend some good study guides / crams / books. Cheers, (8 Replies)
Discussion started by: unrealuk
8 Replies
Login or Register to Ask a Question