source: trunk/oarutils/Makefile @ 51

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