The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Makefile help tantric High Level Programming 4 04-12-2007 10:35 PM
Makefile NamrataGurav High Level Programming 7 10-07-2006 11:29 AM
about the makefile ligerdave High Level Programming 2 01-30-2006 09:21 PM
Using cut within makefile wvdeijk UNIX for Dummies Questions & Answers 2 12-14-2005 01:11 PM
makefile help pieter023 Shell Programming and Scripting 1 06-05-2005 10:20 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-2008
Registered User
 

Join Date: Mar 2008
Location: Greece
Posts: 14
Stumble this Post!
Makefile

I am writing my first makefile, and I face a problem:

Code:
all: sequential pthreads1 pthreads2 openmp1 openmp2

sequential: sequential/main.c sequential/definitions.h
	gcc -o seq sequential/main.c

pthreads1: pthreads1/main.c pthreads1/definitions.h
	gcc -o pthr1 pthreads1/main.c -lpthread

pthreads2: pthreads2/main.c pthreads2/definitions.h
	gcc -o pthr2 pthreads2/main.c -lpthread

openmp1: openmp1/main.c openmp1/definitions.h
	gcc -o open1 openmp1/main.c -fopenmp

openmp2: openmp2/main.c openmp2/definitions.h
	gcc -o open2 openmp2/main.c -fopenmp

clean:
	rm -f seq pthr1 pthr2 open1 open2

force:
	cd sequential; touch *
	cd pthreads1; touch *
	cd pthreads2; touch *
	cd openmp1; touch *
	cd openmp2; touch *
	make all
Why make force doesn't compile openmp2?

EDIT: Problem solved. I had forgotten to put the lines in bold.

Last edited by myle; 07-02-2008 at 10:53 AM.
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0