1 | |
---|
2 | # Makefile for Rappture2 |
---|
3 | # Copyright (C) 2004-2007 Derrick S. Kearney. |
---|
4 | # For conditions of distribution and use, see license.terms |
---|
5 | |
---|
6 | # To compile and test, type: |
---|
7 | # ./configure; make test |
---|
8 | # The call of configure is optional if you don't have special requirements |
---|
9 | # |
---|
10 | # To install librappture2.* and rappture2.h, type: |
---|
11 | # make install |
---|
12 | # To install in $HOME instead of /usr/local, use: |
---|
13 | # make install prefix=$HOME |
---|
14 | |
---|
15 | bindir = @bindir@ |
---|
16 | datadir = @datadir@ |
---|
17 | datarootdir = @datarootdir@ |
---|
18 | exec_prefix = @exec_prefix@ |
---|
19 | includedir = @includedir@ |
---|
20 | libdir = @libdir@ |
---|
21 | man3dir = ${mandir}/man3 |
---|
22 | mandir = @mandir@ |
---|
23 | prefix = @prefix@ |
---|
24 | scriptdir = $(exec_prefix)/lib |
---|
25 | srcdir = @srcdir@ |
---|
26 | incdir = $(prefix)/include |
---|
27 | |
---|
28 | CXX = @CXX@ |
---|
29 | CC = @CXX@ |
---|
30 | CFLAGS_DEBUG = @CFLAGS_DEBUG@ |
---|
31 | CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ |
---|
32 | STLIB_LD = @STLIB_LD@ |
---|
33 | SHLIB_LD = @SHLIB_LD@ |
---|
34 | SHLIB_CFLAGS = @SHLIB_CFLAGS@ |
---|
35 | SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ |
---|
36 | SHLIB_SUFFIX = @SHLIB_SUFFIX@ |
---|
37 | CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ |
---|
38 | LIB_SEARCH_DIRS = -L../core @LIB_SEARCH_DIRS@ |
---|
39 | CFLAGS = @CFLAGS@ -fPIC |
---|
40 | CPP = @CPP@ |
---|
41 | |
---|
42 | INSTALL = @INSTALL@ |
---|
43 | MKDIR_P = @MKDIR_P@ |
---|
44 | VPATH = $(srcdir) |
---|
45 | |
---|
46 | name = rappture2 |
---|
47 | libname = lib$(name) |
---|
48 | lib = $(libname).a |
---|
49 | shared_lib = $(libname)$(SHLIB_SUFFIX) |
---|
50 | |
---|
51 | AR = ar rcv |
---|
52 | RANLIB = @RANLIB@ |
---|
53 | SHELL = @SHELL@ |
---|
54 | VPATH = $(srcdir) |
---|
55 | |
---|
56 | LIBS = -lrappture -lz |
---|
57 | |
---|
58 | INCLUDES = \ |
---|
59 | -I$(srcdir) \ |
---|
60 | -I$(srcdir)/../core \ |
---|
61 | -I$(includedir) |
---|
62 | |
---|
63 | OBJS = \ |
---|
64 | RpMesh1D.o \ |
---|
65 | RpField1D.o \ |
---|
66 | RpMeshTri2D.o \ |
---|
67 | RpMeshRect3D.o \ |
---|
68 | RpFieldRect3D.o \ |
---|
69 | RpMeshPrism3D.o \ |
---|
70 | RpFieldPrism3D.o \ |
---|
71 | RpSerialBuffer.o \ |
---|
72 | RpSerializer.o \ |
---|
73 | RpSerializable.o |
---|
74 | |
---|
75 | HEADERS = \ |
---|
76 | RpField1D.h \ |
---|
77 | RpFieldPrism3D.h \ |
---|
78 | RpFieldRect3D.h \ |
---|
79 | RpFieldTri2D.h \ |
---|
80 | RpMesh1D.h \ |
---|
81 | RpMeshPrism3D.h \ |
---|
82 | RpMeshRect3D.h \ |
---|
83 | RpMeshTri2D.h \ |
---|
84 | RpNode.h \ |
---|
85 | RpSerialBuffer.h \ |
---|
86 | RpSerializable.h \ |
---|
87 | RpSerializer.h \ |
---|
88 | rappture2.h |
---|
89 | |
---|
90 | all: $(lib) $(shared_lib) |
---|
91 | |
---|
92 | $(lib): $(OBJS) |
---|
93 | $(RM) $@ |
---|
94 | $(AR) $@ $(OBJS) |
---|
95 | $(RANLIB) $@ |
---|
96 | |
---|
97 | $(shared_lib): $(OBJS) |
---|
98 | $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) $(LIB_SEARCH_DIRS) $(LIBS) |
---|
99 | |
---|
100 | install: install_libs install_headers |
---|
101 | |
---|
102 | install_libs: $(lib) $(shared_lib) |
---|
103 | $(MKDIR_P) $(libdir) |
---|
104 | $(INSTALL) -m 444 $(lib) $(libdir) |
---|
105 | $(INSTALL) -m 555 $(shared_lib) $(libdir) |
---|
106 | |
---|
107 | # This is no manual page for rappture yet. |
---|
108 | install_man: |
---|
109 | $(MKDIR_P) $(man3dir) |
---|
110 | $(INSTALL) -m 444 rappture.3 $(man3dir) |
---|
111 | |
---|
112 | install_headers: |
---|
113 | $(MKDIR_P) $(includedir)/rappture2 |
---|
114 | for i in $(HEADERS) ; do \ |
---|
115 | $(INSTALL) -m 444 $(srcdir)/$$i $(includedir)/rappture2; \ |
---|
116 | done |
---|
117 | |
---|
118 | uninstall: uninstall_libs uninstall_man uninstall_headers |
---|
119 | |
---|
120 | uninstall_libs: $(lib) $(shared_lib) |
---|
121 | $(RM) $(libdir)/$(lib) $(libdir)/$(shared_lib) |
---|
122 | |
---|
123 | uninstall_man: |
---|
124 | $(RM) $(man3dir)/rappture.3 |
---|
125 | |
---|
126 | uninstall_headers: |
---|
127 | for i in $(HEADERS) ; do \ |
---|
128 | $(RM) $(includedir)/rappture2/$$i; \ |
---|
129 | done |
---|
130 | .cc.o: |
---|
131 | $(CXX) $(CFLAGS) $(INCLUDES) $(DEBUG) -c $? |
---|
132 | .c.o: |
---|
133 | $(CC) $(CFLAGS) $(INCLUDES) $(DEBUG) -c $? |
---|
134 | |
---|
135 | |
---|
136 | clean: |
---|
137 | $(RM) $(OBJS) $(lib) $(shared_lib) |
---|
138 | $(RM) buffer1.txt RpBuffer_test$(EXE) |
---|
139 | |
---|
140 | distclean: clean |
---|
141 | $(RM) Makefile *~ |
---|
142 | |
---|
143 | docs: |
---|
144 | $(MKDIR_P) ../../docs/rappture2 |
---|
145 | doxygen |
---|
146 | |
---|