source: trunk/oarutils/Makefile @ 49

Last change on this file since 49 was 49, checked in by g7moreau, 12 years ago
  • General makefile width install and update
  • Cut long line
  • Property svn:eol-style set to native
File size: 1.4 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
10
11PREFIX     :=/opt/oar/current
12PREFIX_MAN  =$(PREFIX)/man
13
14
15# User specific configuration
16
17sinclude config.mk
18
19
20# Target and rules
21
22.PHONY: all clean distclean install update sync
23
24all: $(TARGET_C) $(TARGET_MAN)
25
26clean:
27        rm -f *.o
28
29distclean: clean
30        rm -f mpilauncher
31
32install: update
33
34update:
35        @install -d -m 0755 -o root -g root $(PREFIX)/bin
36        @install -d -m 0755 -o root -g root $(PREFIX_MAN)/man1
37        install -m 0755 -o root -g root oar-parexec $(PREFIX)/bin
38        install -m 0755 -o root -g root oar-dispatch $(PREFIX)/bin
39        install -m 0755 -o root -g root mpilauncher $(PREFIX)/bin
40        install -m 0644 -o root -g root oar-parexec.1 $(PREFIX_MAN)/man1
41        install -m 0644 -o root -g root oar-dispatch.1 $(PREFIX_MAN)/man1
42        install -m 0644 -o root -g root mpilauncher.1 $(PREFIX_MAN)/man1
43        install -m 0644 -o root -g root oar-envsh.1 $(PREFIX_MAN)/man1
44
45sync:
46        svn update
47
48mpilauncher: mpilauncher.o
49        $(CC) $(CCFLAGS) -o $@ $<
50
51%.o: %.cpp
52        $(CC) $(CCFLAGS) -c $<
53
54%.1: %.cpp
55        sed -re 's#^[/ ]\* ?##; s#^// ?##' $< | pod2man -n $* $(PODFLAG) > $@
56
57%.1: %
58        pod2man -n $* $(PODFLAG) $< > $@
59
60# astyle --style=banner -s3 mpilauncher.cpp
61# 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.