Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Search Forums:



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-17-2009
Registered User
 

Join Date: Dec 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Trouble with flex command in makefile

Hey all, im trying to create a makefile in unix. cpp2html is a program created from the files cpp2html.o and lex.yy.o.
cpp2html.o is created from compiling cpp2html.c and lex.yy.o is created from another created file lex.yy.c. and lex.yy.c is created from a command "flex cppscanner.l" and here is what i have so far


Code:
cpp2html: cpp2html.o lex.yy.o 
	gcc -g -DDEBUG cpp2html.o lex.yy.o
	mv a.out cpp2html
 
cpp2html.o: cpp2html.c
	gcc -g -DDEBUG -c cpps2html.c
 
lex.yy.o: lex.yy.c
	gcc -g -DDEBUG -c lex.yy.c


i do not know where to implement the command "flex cppscanner.l" to make the file lex.yy.c any suggestions would be great

Last edited by pludi; 12-18-2009 at 03:13 AM.. Reason: code tags, please...
Sponsored Links
    #2  
Old 12-18-2009
quirkasaurus's Avatar
Registered User
 

Join Date: Jan 2009
Location: canton, michigan
Posts: 481
Thanks: 0
Thanked 7 Times in 7 Posts
add:


Code:
lex.yy.c: cppscanner.l
        flex cppscanner.l

right before the lex.yy.c line.
Make sure that the word "flex" is proceeded by a TAB only.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Makefile problem - How to run module load in a Makefile hernandinho UNIX for Advanced & Expert Users 2 04-13-2009 11:20 AM
Trouble with tee command to capture script outputs muthubharadwaj Shell Programming and Scripting 5 02-16-2009 08:29 PM
Trouble formatting egrep command with AWK cruiser AIX 2 03-22-2006 05:59 PM
my problems with MAKEFILE command aliasunway Programming 2 12-28-2005 09:49 PM
trouble using mailx command ldrojasm Shell Programming and Scripting 2 04-03-2002 06:52 AM



All times are GMT -4. The time now is 05:59 AM.