1234567891011121314151617181920212223242526272829 |
- CFLAGS:= -fopenmp
- LDFLAGS:= -fopenmp
- CXX:= gcc
- PROG:= openmp-hello-world
- DESTDIR:=
- PREFIX:=
- OBJS:= main.o
- all: $(PROG)
- %.o: src/%.c src/%.h
- $(CXX) $(CFLAGS) -c $<
- $(PROG): $(OBJS)
- $(CXX) -Wall -Wextra -pedantic -g $(OBJS) -o $(PROG) $(LDFLAGS)
- install: all
- @echo installing executable file to ${DESTDIR}${PREFIX}/bin
- @mkdir -p ${DESTDIR}${PREFIX}/bin
- @cp -f ${PROG} ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/${PROG}
- uninstall:
- @echo removing executable file from ${DESTDIR}${PREFIX}/bin
- @rm -f ${DESTDIR}${PREFIX}/bin/${PROG}
- clean:
- rm -f $(PROG) *.o
|