Operating System - Tru64 Unix
1748167 Members
4083 Online
108758 Solutions
New Discussion юеВ

Help with Makefile

 
Michael Milchin
New Member

Help with Makefile

Hello!

I need help with make utility. I received a Makefile, which (by customer's
words) used on his LINUX system to build their application. They tried to re-use the same Fakefile on TRU64 V4.0g, but any type of make utility (make(1),
make(1u) and make(1p)) fail to process this file.

Bellow is the Makefile as provided by the customer:

******************************************************************
###########################
# Set up appropriate suffix list

.SUFFIXES:
.SUFFIXES: .o .f

FC = f90

VERSION = V1.28.8

#Optimize...
FFLAGS = -O -c -K -v -double_size 64 -noerror_limit -static \
-extend_source -inline all -align dcommons -align records \
-fpconstant


#FFLAGS = -save -fpconstant -align dcommons -static \
# -real_size 64 -traceback -warn all -extend_source -align all \
# -autodouble -common_args -noerror_limit -u -vms \
# -fltconsistency -axP -IPF_fltacc \
# -O -ipo # 3:03

INCLUDES = -I../../$(VERSION)/common

LIBS = $(OBJDIR)/msm.a

OBJDIR = ../../$(VERSION)/obj

RUNDIR = ../../$(VERSION)/run

EXEC=$(RUNDIR)/mis_pk_b

LINKER = f90

SOURCES:= $(wildcard *.f)

#OBJS:= $(patsubst %.f,$(OBJDIR)/%.o,$(SOURCES))
OBJS:= $(patsubst *.f,$(OBJDIR)/*.o,$(SOURCES))

#$(OBJDIR)/%.o: %.f
$(OBJDIR)/*.o: *.f
$(FC) $(FFLAGS) $(INCLUDES) -c $< -o $@

all: $(EXEC)

$(EXEC): $(OBJS)
@echo $@
$(FC) $(FFLAGS) $(OBJS) -o $@

# clean: @rm -f $(OBJS)
*************************************************************

Here is the output, produced by make(1p), when processing the above file:

star-...michaelm>/usr/bin/posix/make -f Makefile -n Error! Open brace/parenthesis not balanced with close brace/parenthesis. $(wildcard *f) Error! Open brace/parenthesis not balanced with close brace/parenthesis. $(patsubstr *.f,$(OBJDIR)/*.o,$(SOURCES)) Error! Could not figure out how to make *.f. Stop.

As much as I know, 'wildcard' and 'patsubst' are GNU make file processing built-in functions. It seems, those functions are not supported by the make versions, provided with TRU64. The OpenVMS MMS utility (which is based on make) enables the a lot of GNU make built-in functions using /EXTENDED_SYNTAX qualifier.

As an alternative, the customer asked, whether it is possible to generate the makefile template, providing application sources? It is possible on OpenVMS using MMS/GENERATE and on HP-UX, using mkmf utility.

Any help will be greately appreciated.

Michael
3 REPLIES 3
Kasper Hedensted
Trusted Contributor

Re: Help with Makefile

Hi Michael,

I have tried to compile different opensource progams on Tru64, and my experience is that it runs better if you use GNU make and gcc.

I just found this command: xmkmf, I don't now if it is simmilar to the mkmf command on HP-UX ?

Just my 2 cents :)

Cheers,
Kasper
Balasubramanian S
Frequent Advisor

Re: Help with Makefile

Hello Michael, The xmkmf command can be used to create Makefile from an Imakefile shipped with third-party software.

-Bala S
Michael Milchin
New Member

Re: Help with Makefile

I downloaded and installed GNU make on my system and it seems processing the above Makefile without errors. I posted the customer the GNU make package for his review- Unsupported, indeed.

Thanks to all!

Michael