source: trunk/oarutils/Makefile @ 425

Last change on this file since 425 was 99, checked in by g7moreau, 11 years ago
  • Add new oar-profile.sh for bash source profile
  • Property svn:eol-style set to native
File size: 1.9 KB
RevLine 
[17]1
[49]2# General configuration
[17]3
[51]4CC      := mpiCC
5CCFLAGS := -O2
6PODFLAG := -c 'User Contributed OAR Documentation' -r 'LEGI Trokata'
[24]7
[51]8TARGET_C    := mpilauncher
[99]9TARGET_MAN  := mpilauncher.1    oar-envsh.1    oar-dispatch.1    oar-parexec.1    oar-profile.1
10TARGET_HTML := mpilauncher.html oar-envsh.html oar-dispatch.html oar-parexec.html oar-profile.html
[17]11
[49]12PREFIX     :=/opt/oar/current
13PREFIX_MAN  =$(PREFIX)/man
[99]14PREFIX_ETC  =$(PREFIX)/etc
[49]15
16
17# User specific configuration
18
19sinclude config.mk
20
21
22# Target and rules
23
[98]24.PHONY: all clean distclean install update sync upload
[48]25
[51]26all: $(TARGET_C) $(TARGET_MAN) $(TARGET_HTML)
[17]27
28clean:
29        rm -f *.o
30
31distclean: clean
32        rm -f mpilauncher
33
[48]34install: update
[17]35
[48]36update:
[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
50sync:
51        svn update
52
[98]53upload:
54        cadaver --rcfile=cadaverrc
55
[17]56mpilauncher: 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
Note: See TracBrowser for help on using the repository browser.