Friday, 15 June 2012

c - makefile error: make: *** No rule to make target `omp.h' ; with OpenMP -



c - makefile error: make: *** No rule to make target `omp.h' ; with OpenMP -

all, compiling c programme openmp. it's first time utilize makefile. when excuting "make", gcc reports error make: * no rule create target omp.h', needed bysmooth.o'. stop. omp.h in /usr/lib/gcc/i686-linux-gnu/4.6/include/omp.h , wondering how prepare it. help me? give thanks you.

cc=gcc cflags = -fopenmp all: smooth smooth: smooth.o ompsooth.o $(cc) $(cflags) -o smooth smooth.o ompsmooth.o ompsmooth.o: ompsmooth.c assert.h stdio.h stdlib.h omp.h ompsmooth.h gcc $(cflags) ompsmooth.c smooth.o: smooth.c ompsmooth.h omp.h stdio.h stdlib.h string.h sys/types.h sys/stat.h fcntl.h gcc $(cflags) smooth.c clean: rm *.o rm smooth

unless you're expecting standard header files change, simplest solution remove them prerequisite list(s).

if don't want above, you'll either need specify finish path omp.h, or utilize vpath mechanism.

c gcc makefile openmp

No comments:

Post a Comment