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:[LIST]
]Compile cpp2html.c to produce cpp2html.o.
( Important: the source code in these files is C, not C++, and so must be compiled and linked with gcc, not g++.)[LIST]
Run the command
flex cppscanner.l
to produce the file lex.yy.c from the language description in cppscanner.l.[LIST]
Compile lex.yy.c to produce lex.yy.o. (This often produces a warning message about extra tokens. Ignore it.)[LIST]
Link the the .o files to produce an executable program named cpp2html[LIST]
Write a makefile that will carry out these steps. Your makefile should result in only the minimum required amount of steps when any input file to this process is changed.
2. Relevant commands, code, scripts, algorithms:
just unix commands
3. The attempts at a solution (include all code and scripts):
my makefile
Ive tried calling the flex command in the 'make' command line, is that the right process? 4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Old Dominion University,Norfolk(VA), USA, Mr. Zeil, CS 252
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 Corona688; 12-04-2013 at 02:26 PM..
If you don't tell it the target you want, make considers the first rule given to be the product you want. That's why it was making cpp2html.o, just because it was at the top of the file. Try telling it 'make cpp2html' and it would do it if your makefile was correct.
Your makefile is a little overspecified -- you don't need to tell it how to make .o files.
Your compile line is wrong too, -c makes .o files, and you don't want gcc making an .o file in the linking step. And you don't have to do a mv after if you tell gcc what file to make in the first place.
I would simplify it down to this:
Also, no, it is not right to give it the flex command in the commandline. It should be in your makefile. Show me what you run to generate lex.yy.o and I'll show how to incorporate it into your makefile.
Last edited by Corona688; 12-04-2013 at 02:42 PM..
in RHEL 6.10, how can we make the the df -k return the output without wrapping. And wihout using the df -Pk option. After we patched a Linux server from 6.5 to 6.10:
The df -k on RHAT 6.10 it wraps the line for ex:
6.10:
/dev/mapper/vgapp01-vendor
... (2 Replies)
Hi,
I see following 'nfsd' command is using more CPU. Could someone please comment on it's pros and cons of it?
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
5 ? 16890 root 152 20 34696K 12036K run 57166:48 856.13 854.64 nfsd
OS -- HP-UX
One... (4 Replies)
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:
Compile cpp2html.c to produce cpp2html.o.
( Important: the source code in these files is C, not C++, and so... (8 Replies)
We are using oracle database on solaris 10 sparc 64 bit on M5000 machine. we facing performance related issues.
We diagnose using prstat -a command that oracle user not utilizing the ram more than 30 gb total we have 64 gb ram available as in project max-shm-memory set to 42 gb . We are running... (2 Replies)
Hi i recently observed my cpu being used 100% due to which load average on machine get increased to < 5.
I have no idea what the process is?
Appreciate any help in this regard.
root 15859 99.9 0.0 5668 1592 pts/4 R+ 12:28 660:06 \_ pvs
root 7334 99.9 ... (2 Replies)
I'm having a bit of trouble trying to make use of Net::SSH::Expect. I've started getting dependent libraries and set PERL5LIB to add my custom path because I don't have root access. I tried using cpan, but it always tries to use paths I don't have access to. Next, I tried just moving the .pm... (1 Reply)
dears
what i need to make is
cp -irp file_name filename
tar cvf filename.tar filename
gzip filename.tar
in one commane using exec
it that prossible and how can i do that (4 Replies)
I would like to have the function keys available to me in my scripts. Anyone have any ideas on how to map these to functionality I design? :confused: (3 Replies)
Can anybody please help me on how to optimize following command as it use up a lot of CPU :
tail -f $DIR3$DATE4.log |\
while read line
do echo $line | egrep "Processing incoming SMS message" | sed 's/\,/ /g' \
| awk '{print $2}' >> $DIR2/LIST1.$DATE4.log && echo... (6 Replies)
Dear Guys ,
Kindly note that i have sun solaries 8 intel machine .
i installed apache and it is working fine .
i am installing perl5 , MD5 and CGI .
but whenever i execute the commands , make , make test and make install i get error message : not found
# make
make: not found
also i... (2 Replies)