all, I was compiling a C program with OpenMP. It's my first time to use makefile. When excuting "make", the gcc reports the error make: * No rule to make target omp.h', needed by
smooth.o'. Stop. However the omp.h is in the /usr/lib/gcc/i686-linux-gnu/4.6/include/omp.h , I am wondering how to fix it. Could anyone help me? Thank 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