[17] | 1 | |
---|
[49] | 2 | # General configuration |
---|
[17] | 3 | |
---|
[51] | 4 | CC := mpiCC |
---|
| 5 | CCFLAGS := -O2 |
---|
| 6 | PODFLAG := -c 'User Contributed OAR Documentation' -r 'LEGI Trokata' |
---|
[24] | 7 | |
---|
[51] | 8 | TARGET_C := mpilauncher |
---|
| 9 | TARGET_MAN := mpilauncher.1 oar-envsh.1 oar-dispatch.1 oar-parexec.1 |
---|
| 10 | TARGET_HTML := mpilauncher.html oar-envsh.html oar-dispatch.html oar-parexec.html |
---|
[17] | 11 | |
---|
[49] | 12 | PREFIX :=/opt/oar/current |
---|
| 13 | PREFIX_MAN =$(PREFIX)/man |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | # User specific configuration |
---|
| 17 | |
---|
| 18 | sinclude config.mk |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | # Target and rules |
---|
| 22 | |
---|
[98] | 23 | .PHONY: all clean distclean install update sync upload |
---|
[48] | 24 | |
---|
[51] | 25 | all: $(TARGET_C) $(TARGET_MAN) $(TARGET_HTML) |
---|
[17] | 26 | |
---|
| 27 | clean: |
---|
| 28 | rm -f *.o |
---|
| 29 | |
---|
| 30 | distclean: clean |
---|
| 31 | rm -f mpilauncher |
---|
| 32 | |
---|
[48] | 33 | install: update |
---|
[17] | 34 | |
---|
[48] | 35 | update: |
---|
[49] | 36 | @install -d -m 0755 -o root -g root $(PREFIX)/bin |
---|
| 37 | @install -d -m 0755 -o root -g root $(PREFIX_MAN)/man1 |
---|
| 38 | install -m 0755 -o root -g root oar-parexec $(PREFIX)/bin |
---|
| 39 | install -m 0755 -o root -g root oar-dispatch $(PREFIX)/bin |
---|
| 40 | install -m 0755 -o root -g root mpilauncher $(PREFIX)/bin |
---|
| 41 | install -m 0644 -o root -g root oar-parexec.1 $(PREFIX_MAN)/man1 |
---|
| 42 | install -m 0644 -o root -g root oar-dispatch.1 $(PREFIX_MAN)/man1 |
---|
| 43 | install -m 0644 -o root -g root mpilauncher.1 $(PREFIX_MAN)/man1 |
---|
| 44 | install -m 0644 -o root -g root oar-envsh.1 $(PREFIX_MAN)/man1 |
---|
[48] | 45 | |
---|
| 46 | sync: |
---|
| 47 | svn update |
---|
| 48 | |
---|
[98] | 49 | upload: |
---|
| 50 | cadaver --rcfile=cadaverrc |
---|
| 51 | |
---|
[17] | 52 | mpilauncher: mpilauncher.o |
---|
| 53 | $(CC) $(CCFLAGS) -o $@ $< |
---|
| 54 | |
---|
| 55 | %.o: %.cpp |
---|
| 56 | $(CC) $(CCFLAGS) -c $< |
---|
[23] | 57 | |
---|
| 58 | %.1: %.cpp |
---|
[29] | 59 | sed -re 's#^[/ ]\* ?##; s#^// ?##' $< | pod2man -n $* $(PODFLAG) > $@ |
---|
[23] | 60 | |
---|
[50] | 61 | %.html: %.cpp |
---|
| 62 | sed -re 's#^[/ ]\* ?##; s#^// ?##' $< | pod2html > $@ |
---|
| 63 | |
---|
[29] | 64 | %.1: % |
---|
| 65 | pod2man -n $* $(PODFLAG) $< > $@ |
---|
| 66 | |
---|
[50] | 67 | %.html: % |
---|
| 68 | pod2html $< > $@ |
---|
| 69 | |
---|
[23] | 70 | # astyle --style=banner -s3 mpilauncher.cpp |
---|
[41] | 71 | # perltidy -i=3 -ci=3 -icp -icb -pt=2 -bt=2 -bbt=2 -b oar-parexec |
---|