1 | |
---|
2 | # General configuration |
---|
3 | |
---|
4 | CC := mpiCC |
---|
5 | CCFLAGS := -O2 |
---|
6 | PODFLAG := -c 'User Contributed OAR Documentation' -r 'LEGI Trokata' |
---|
7 | |
---|
8 | TARGET_C := mpilauncher |
---|
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 |
---|
11 | |
---|
12 | PREFIX :=/opt/oar/current |
---|
13 | PREFIX_MAN =$(PREFIX)/man |
---|
14 | PREFIX_ETC =$(PREFIX)/etc |
---|
15 | |
---|
16 | |
---|
17 | # User specific configuration |
---|
18 | |
---|
19 | sinclude config.mk |
---|
20 | |
---|
21 | |
---|
22 | # Target and rules |
---|
23 | |
---|
24 | .PHONY: all clean distclean install update sync upload |
---|
25 | |
---|
26 | all: $(TARGET_C) $(TARGET_MAN) $(TARGET_HTML) |
---|
27 | |
---|
28 | clean: |
---|
29 | rm -f *.o |
---|
30 | |
---|
31 | distclean: clean |
---|
32 | rm -f mpilauncher |
---|
33 | |
---|
34 | install: update |
---|
35 | |
---|
36 | update: |
---|
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 | |
---|
50 | sync: |
---|
51 | svn update |
---|
52 | |
---|
53 | upload: |
---|
54 | cadaver --rcfile=cadaverrc |
---|
55 | |
---|
56 | mpilauncher: 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 |
---|