GFORTRAN sending .o files in separate directory


 
Thread Tools Search this Thread
Top Forums Programming GFORTRAN sending .o files in separate directory
# 1  
Old 11-12-2012
GFORTRAN sending .o files in separate directory

I am using gfortran and want to send .o files in separate directory.

Currently I have the following in a bash script. The .mod files are handled ok, but the .o files are still created in the same directory as the source code

Code:
fsrc="newunit.f08 math.f08 tString.f08 prout.f08 prary.f08 apodization.f08"
swth="-std=f2008 -Wextra -Wall -pedantic -fbounds-check"

objDir="./bin/objBin"
modDir="./bin/modBin"

fobj="$objDir/newunit.o $objDir/math.o $objDir/tString.o $objDir/prout.o $objDir/prary.o"
fobj="$fobj $objDir/apodization.o"

gfortran $swth -c $fsrc -J $modDir

# 2  
Old 11-12-2012
Where do you specify the object file? I don't think you do.

Use a makefile and forget the shell script unless you're using it to call make.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sending Multipes files as attachents in directory

When i run the below command in Unix it works echo|mailx -s "Subject" $( printf -- '-a %q ' /Directory/*.* ) mail_address < /directory/mail_body.txt But when the same command is run in AIX Platform I get invalid -a error. Could you please help on this Please use CODE tags as... (4 Replies)
Discussion started by: arunkesi
4 Replies

2. Shell Programming and Scripting

Need separate vi files in shell

Input: I have input file below mentioned.Input file has Yahoo,gmail,yuimn etc..are websites and there are users listed under it. I have many other unique websites but i mentioned just few as below. For example: Yahoo is website and 123,fsfd are members of website "yahoo". See below input... (19 Replies)
Discussion started by: buzzme
19 Replies

3. Shell Programming and Scripting

awk separate files to one directory

I am trying to output all files that are made by this awk to a specific directory. awk -F '' '{f = $3 ".txt"; print > f}' input.txt Since the actual data has several hundred files I redirect the output (well tried to) to a directory. awk -F '' '{f = $3 ".txt"; close($3 ".txt")} print >... (6 Replies)
Discussion started by: cmccabe
6 Replies

4. Shell Programming and Scripting

Separate columns into different text files

Hi I have large text file consisting of five columns. Sample of the file is give below: ed 2-4 12.0 commons that they depended on. मानवों नष्ट किया जिन पर वो आधारित थे। ed 3-1 12.0 Almost E, but would be over. रचना करीब करीब ई तक जाती है, मगर तब तो नाटक ख़त्म हो... (2 Replies)
Discussion started by: my_Perl
2 Replies

5. Shell Programming and Scripting

Output in separate files

Hi all, i have the bash script for remote conection, for hosts in $(cat /list); do ssh user1@$hosts "hostname"; done execute hostname command by all hosts and show standar ouput, how i can send to file by each host in lists, so e.g. $cat list 10.0.0.1 10.0.0.2... (1 Reply)
Discussion started by: aav1307
1 Replies

6. Shell Programming and Scripting

Saving svn log in a separate directory

Hi Folks, I have a directory at /usr/local/aa and there is other directory where I have checkout the code through svn checkout command ( /opt/app/fgh) now I can apply svn log command here as shown below $ cd /opt/app/fgh svn checkout <url> svn log shows me the log on console . please... (3 Replies)
Discussion started by: punpun66
3 Replies

7. Web Development

Two separate domains - and files

Hi, I've been asked to 'troubleshoot' a webserver where two different TLDs are being served. Or to be more accurate, 'domain.com' and 'domain.fr'. So we have /var/www/domain.com /var/www/domain.fr And then for some reason, the httpd.conf file points to two different configuration files.... (1 Reply)
Discussion started by: davidm123SED
1 Replies

8. Shell Programming and Scripting

Using bash to separate files files based on parts of a filename

Hey guys, Sorry for the basic question but I have a lot of files that I want to separate into groups based on filenames which I can then cat together. Eg I have: (a_b_c.txt) WB34_2_SLA8.txt WB34_1_SLA8.txt WB34_1_DB10.txt WB34_2_DB10.txt WB34_1_SLA8.txt WB34_2_SLA8.txt 77_1_SLA8.txt... (1 Reply)
Discussion started by: Breentax
1 Replies

9. Shell Programming and Scripting

script to monitor files in a directory and sending the alert

Hi All, We are having important config files in an directory which was accessable by all /auto/config/Testbed/>ls config1.intial config2.intial config3.inital often we find that some of the lines are missing in config files, we doubt if some one is removing. I would like to write... (0 Replies)
Discussion started by: shellscripter
0 Replies

10. Shell Programming and Scripting

displaying 3 directory listings in 3 separate columns.

i having problems figuring out how to 'read' in 3 different directory listings and then display them on the screen into 3 separate columns. i thought i could use a 'for' loop to grab each directory and then assign a unique variable to each line 'read' in. of course, as you experts all know,... (16 Replies)
Discussion started by: mjays
16 Replies
Login or Register to Ask a Question