Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
SUSE / openSUSE This Forum is for the discussion of Suse Linux.


  Search this Thread
Old 05-26-2011, 09:45 AM   #1
LQ Newbie
Registered: May 2011
Posts: 2

Rep: Reputation: Disabled
compiler flags in Makefile..!!!??

I use Open Suse 11.3 ver /i586/32bit architecture.
I am new to editing compiler flags in make file and hence to 'make' to compile a program.
I have fftw3 libraries in the path
I have gcc compiler installed.
from the code that i downloaded from the internet, a variable,
FFTWDIR is defined. I guess, this asks for the location of FFTW directory and the c routine version folder etc ( exact path).
What should i give here when i don't have any FFTWDIR in my system at all??
After giving just /usr i get error saying
bash: make: command not found
Here is the code.
CC = gcc

SRC = tfreq.c
PSRC = pos2vel.c


#compiler flags

IDIRS  =  -I $(FFTWDIR)/include
#IDIRS2  = -I $(MPIDIR1)/include
#LAPACK  = -L $(ACMLDIR)/lib -lacml -lpathfortran
#MPI    = -L $(MPIDIR) -lmpi
LIBS   = -L $(FFTWDIR)/lib -lfftw3 -lm

tfreq: $(OBJ)
        $(CC) -O3 $(IDIRS) $(OBJ) $(LIBS) -o $@

pos2vel: $(POBJ)
        $(CC) -O3 $(IDIRS) $(OBJ) $(LIBS) -o $@

%.o: %.c
        $(CC) $(FLAGS) -c $<

clean : 
        \rm -f *.o *~ *.mod
Need to know what should i specify that i is in blue text.?
What modification should i make in order for this to work?

Thanks in advance for any advices.
Old 05-26-2011, 10:33 AM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,823

Rep: Reputation: 611Reputation: 611Reputation: 611Reputation: 611Reputation: 611Reputation: 611
You should install the make command (by installing the make package).
Old 05-26-2011, 10:57 AM   #3
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The direct answer to your question is '/usr/lib', since that seems to be where the respective library would be found.
As AlucardZero has already pointed out, you will need to install gnu make to use the Makefile. Another point is that the Makefile is frequently generated or customized by a configure script. You should carefully read any INSTALL or README files that came with your source code package, and see if this is the case in your situation. In many cases, there are three simple steps used to build a package from sources:
# as root...
make install
--- rod.
Old 05-26-2011, 11:45 AM   #4
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
.... And : You have no "lfftw3" = :

The fftw3 development files are missing.

# 'zypper in fftw3-devel' : will install the files.
Old 05-26-2011, 12:15 PM   #5
LQ Newbie
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Smile Solved i guess :)

Thanks a lot for the replies.
I found out that fftwdlevel was missing and installed that, the same suggestion was given to me by Mr/ Ms. knudfl ( thanks a lot ). Then instead of adding the directory for that FFTW3, i added the line for that variable
FFTWDIR = /usr/bin/ffw-wisdom-to-conf

Also, from YAST installed the 'make' package ( as suggested by our senior members in this group).

and edited the line usr/local/lib to /usr/lib ( that has the required lib files ) of file located at /etc and run ldconfig there by updating the location of the library files. and then typed make and that gave me the required exe file for further processing.

Once again thanks a lot for all the quick replies.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ - Where to place library flags in a makefile? golmschenk Programming 8 04-11-2011 03:45 PM
[SOLVED] makefile: change compilation flags by changing target name mosca Programming 2 11-13-2010 06:05 PM
Compiler Flags mkrems Programming 1 06-13-2008 06:55 PM
compiler flags mkrems Linux - Software 1 04-22-2008 12:53 AM
Makefile question - multiple compilation flags benobi Programming 7 08-11-2005 01:42 PM > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:21 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration