source: trunk/oarutils/Makefile @ 53

Last change on this file since 53 was 51, checked in by g7moreau, 12 years ago
  • Add html target
  • Property svn:eol-style set to native
File size: 1.6 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
10TARGET_HTML := mpilauncher.html oar-envsh.html oar-dispatch.html oar-parexec.html
11
12PREFIX     :=/opt/oar/current
13PREFIX_MAN  =$(PREFIX)/man
14
15
16# User specific configuration
17
18sinclude config.mk
19
20
21# Target and rules
22
23.PHONY: all clean distclean install update sync
24
25all: $(TARGET_C) $(TARGET_MAN) $(TARGET_HTML)
26
27clean:
28        rm -f *.o
29
30distclean: clean
31        rm -f mpilauncher
32
33install: update
34
35update:
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
45
46sync:
47        svn update
48
49mpilauncher: mpilauncher.o
50        $(CC) $(CCFLAGS) -o $@ $<
51
52%.o: %.cpp
53        $(CC) $(CCFLAGS) -c $<
54
55%.1: %.cpp
56        sed -re 's#^[/ ]\* ?##; s#^// ?##' $< | pod2man -n $* $(PODFLAG) > $@
57
58%.html: %.cpp
59        sed -re 's#^[/ ]\* ?##; s#^// ?##' $< | pod2html > $@
60
61%.1: %
62        pod2man -n $* $(PODFLAG) $< > $@
63
64%.html: %
65        pod2html $< > $@
66
67# astyle --style=banner -s3 mpilauncher.cpp
68# 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.