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