makefile "no rule to make a target" error -
i have been looking @ problem while , still don't know wrong.
my makefile looks like:
f90 = pgf90 netcdf_dir = /opt/netcdf lbs = -l$(netcdf_dir)/lib -lnetcdff -lnetcdf include_modules = -i$(netcdf_dir)/include exec = cng_wrfchem_emi objs = module_cng_wrfchem_emi_lib.o \ cng_wrfchem_emi.o ${exec} : ${objs} ${f90} -o $@ ${objs} ${libs} .f90.o: ${f90} -c ${include_modules} $< clean: rm -f ${exec} ${objs} *.mod
the error message is:
make: *** no rule make target `module_cng_wrfchem_emi_lib.o', needed `cng_wrfchem_emi'. stop.
all files in same directory picture shows:
thanks
make doesn't know .f90
suffix, suffix rule not valid. it's not enough declare suffix rule if make doesn't know suffix. if want use suffix rules, have add new suffix .suffixes
pseudo-target, this:
.suffixes: .f90
or can use pattern rules, don't require (but gnu make-specific):
%.o : %.f90 ${f90} -c ${include_modules} $<
Comments
Post a Comment