Operating System - HP-UX
1829012 Members
2442 Online
109986 Solutions
New Discussion

makefiles and pattern wildcards

 
mark booth
Occasional Contributor

makefiles and pattern wildcards

I am trying to move a makefile that has worked under
sunos, but now does not make on the system w/ hp-ux. The makefile is creating an executable from a bunch of object files. But I keep getting cannot make. The line that I believe it is choking on is below

$(opath)/%.o : $(cpath)/%.f
f77 -c -o $@ $<

I am not sure if HP-UX knows to deal with the "%" or
not. I am trying to figure out what gives. Any help
would be greatly appreciated.

Thanks Mark
2 REPLIES 2
Scott Van Kalken
Esteemed Contributor

Re: makefiles and pattern wildcards

which compiler?

there is a compiler that comes with HPUX by default, but it's not useful for anything other than compiling the kernel.

If you've got GCC or ansi C check the paths if the compiler isn't specifically pathed in your makefile.
A. Clay Stephenson
Acclaimed Contributor

Re: makefiles and pattern wildcards

I assume you are trying to build a FORTRAN library since the '%' macro is intended to work within libraries.

The .f.o rule should already be known to make but you can do a make -p to display all the make macros and suffix rules. I do assume that you have installed a FORTRAN development system. The other thing that occurs to me (and I can tell because HTML eats white space) is that when you transferred your makefiles to your HP-UX box that you dropped some leading tabs. Make is one of the very few UNIX utilities that absolutely requires tabs in the right places.
If it ain't broke, I can fix that.