source: trunk/oarutils/Makefile @ 215

Last change on this file since 215 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
Line 
1
2# General configuration
3
4CC      := mpiCC
5CCFLAGS := -O2
6PODFLAG := -c 'User Contributed OAR Documentation' -r 'LEGI Trokata'
7
8TARGET_C    := mpilauncher
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
11
12PREFIX     :=/opt/oar/current
13PREFIX_MAN  =$(PREFIX)/man
14PREFIX_ETC  =$(PREFIX)/etc
15
16
17# User specific configuration
18
19sinclude config.mk
20
21
22# Target and rules
23
24.PHONY: all clean distclean install update sync upload
25
26all: $(TARGET_C) $(TARGET_MAN) $(TARGET_HTML)
27
28clean:
29        rm -f *.o
30
31distclean: clean
32        rm -f mpilauncher
33
34install: update
35
36update:
37        @install -d -m 0755 -o root -g root $(PREFIX)/bin
38        @install -d -m 0755 -o root -g root $(PREFIX_MAN)/man1
39        @install -d -m 0755 -o root -g root $(PREFIX_ETC)/
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
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)
49
50sync:
51        svn update
52
53upload:
54        cadaver --rcfile=cadaverrc
55
56mpilauncher: mpilauncher.o
57        $(CC) $(CCFLAGS) -o $@ $<
58
59%.o: %.cpp
60        $(CC) $(CCFLAGS) -c $<
61
62%.1: %.cpp
63        sed -re 's#^[/ ]\* ?##; s#^// ?##' $< | pod2man -n $* $(PODFLAG) > $@
64
65%.html: %.cpp
66        sed -re 's#^[/ ]\* ?##; s#^// ?##' $< | pod2html > $@
67
68%.1: %.sh
69        pod2man -n $* $(PODFLAG) $< > $@
70
71%.html: %.sh
72        pod2html $< > $@
73
74%.1: %
75        pod2man -n $* $(PODFLAG) $< > $@
76
77%.html: %
78        pod2html $< > $@
79
80# astyle --style=banner -s3 mpilauncher.cpp
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.