[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[photran] phtran managed make project fails with project including a module
|
Hi
please consider a simple Managed Make project including 3 files:
!****file main.f90
program test
use VarDef
implicit none
integer :: i
Print *, "input array dimension"
read *,n
call SetArray
a=(/(2*i,i=1,n)/)
print * ,a
end program
!****file setarray.f90
subroutine SetArray
use VarDef
implicit none
allocate(a(n))
end subroutine SetArray
!****file vardef.f90
module VarDef
implicit none
integer,allocatable,dimension(:)::a
integer::n
end module VarDef
the photran does not make the executable file and stop with this error message:
make: *** No rule to make target `VarDef.o', needed by `source_a2/main.o'.
(all the source files are in folder source_a2)
while the following makefile create the executable file without any problem.
FC = gfortran
LD = $(FC)
RM = rm -rf
APP = a2
CFLAGS =
LDFLAGS =
FOPTS = -ffree-form
OBJECTS = $(patsubst %.f90,%.o,$(wildcard *.f90)) \
$(patsubst %.f,%.o,$(wildcard *.f))
all: $(APP)
$(APP): vardef.o $(OBJECTS)
$(LD) -o $@ $^ $(LDFLAGS)
%.o: %.f90
$(FC) $(FOPTS) -c $<
clean:
$(RM) $(APP) *.o *.mod
i checked it with both ifort and gfortran, but the result is the same.
is it a bug in managed make project of phtran?
Regards,
Hadian
PS. i use photran 4.1 beta on ubuntu 7.04.