Trying to compile a program



I have some source code I would like to compile & run under linux. It is
mostly in c and fortran. I believe this program comes from the Unix world.

It has a compile script that I assume is recursive, but I don't know how
it works:
/************************************/
a= `echo `
n=`wcomp -c`
while (test -n $1) do
w=`wcomp $1`
if (test $w != $n) then
echo $w $a $1
$w -c -g $1
fi
shift
done
/***********************************/

The slash * I have added to show where it starts and ends. I assuming
that the "wcomp" I need to change to gcc, is that correct?

And the following I believe compiles the fortran:

/******************************************/
Program WCOMP

c--- Return name of compiler given source file name

Character SFILE*50,CCHAR*2
Integer*4 NARG,LSF

NARG = Iargc ()
LSF = -1
If (NARG .gt. 0) Then
Call Getarg (1,SFILE)
Do 10 I = 50, 1, -1
If (SFILE(I:I) .ne. ' ') Then
LSF = I
Go to 20
Endif
10 Continue

20 If (LSF .lt. 0) Then
Write(*,*) 'WCOMP: Not a source file: ',SFILE
Stop
Else
CCHAR = SFILE(LSF-1:LSF)
If (CCHAR .eq. '.f') Then
Write(*,*) 'f77'
Elseif (CCHAR .eq. '.c') Then
Write(*,*) 'cc'
Else
Write(*,*) 'none'
Endif
Endif
Endif
End
/***********************************************/

Is there anything in here I need to change?
.



Relevant Pages

  • Re: C++/TCL Need Solution to Compile Error c2784
    ... There's always the "Platform SDK" from MSDN if you need the window.h stuff, ... Since I'm using the Command Prompt rather than the GUI to compile the ... I then tried to compile your source code and I kept getting the same ...
    (comp.lang.tcl)
  • Re: Debugging Newbie Question
    ... The CLR does not understand this source code and so before it ... ASP.NET, however, ASP.NET will compile your page's source code and cache ... the debugger will have IL and x86 created from ... in release mode assemblies. ...
    (microsoft.public.dotnet.faqs)
  • Re: Debugging Newbie Question
    ... The CLR does not understand this source code and so before it ... ASP.NET will compile your page's source code and cache the result ... > does this so that a debugger can attach to the code and allow you to step ... > release mode assemblies. ...
    (microsoft.public.dotnet.faqs)
  • The curse of constant fields
    ... feature in the Java language, and decided to write up about it. ... in a class, compile the changed class, and run the code manually to ... A quick search through the source code shows that there is no other ... This is true even if the usage itself is not ...
    (comp.lang.java.programmer)
  • Re: creaping coupling......
    ... In C++ it would be trivial to break that source code dependency, ... When you compile a .java module, ... In Java and C# it's asserted at compile time. ...
    (comp.object)