1 | |
---|
2 | bindir = @bindir@ |
---|
3 | datadir = @datadir@ |
---|
4 | datarootdir = @datarootdir@ |
---|
5 | exec_prefix = @exec_prefix@ |
---|
6 | includedir = @includedir@ |
---|
7 | libdir = @libdir@ |
---|
8 | mandir = @mandir@ |
---|
9 | prefix = @prefix@ |
---|
10 | srcdir = @srcdir@ |
---|
11 | incdir = $(prefix)/include |
---|
12 | |
---|
13 | INSTALL = @INSTALL@ |
---|
14 | MKDIR_P = @MKDIR_P@ |
---|
15 | SVN_VERSION := $(shell svnversion $(srcdir) | sed 's/Unversioned directory/unknown/') |
---|
16 | RAPPTURE_VERSION = @PACKAGE_VERSION@ |
---|
17 | CXX = @CXX@ |
---|
18 | # This hack is because the tcl.m4 file generates the line |
---|
19 | # SHLIB_LD = ${CC} ... |
---|
20 | # We need to link with g++ on MacOS 10.4 |
---|
21 | CC = $(CXX) |
---|
22 | CCC = @CC@ |
---|
23 | CFLAGS_DEBUG = @CFLAGS_DEBUG@ -Wall |
---|
24 | CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ |
---|
25 | STLIB_LD = @STLIB_LD@ |
---|
26 | SHLIB_LD = @SHLIB_LD@ |
---|
27 | SHLIB_CFLAGS = @SHLIB_CFLAGS@ |
---|
28 | SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ |
---|
29 | SHLIB_SUFFIX = @SHLIB_SUFFIX@ |
---|
30 | CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ |
---|
31 | LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@ |
---|
32 | CFLAGS = @CFLAGS@ -fPIC |
---|
33 | DX_LIB_SPEC = @DX_LIB_SPEC@ |
---|
34 | DX_INC_SPEC = @DX_INC_SPEC@ |
---|
35 | DEFINES = -DSVN_VERSION=\"$(SVN_VERSION)\" \ |
---|
36 | -DRAPPTURE_VERSION=\"$(RAPPTURE_VERSION)\" |
---|
37 | |
---|
38 | CC_SWITCHES = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES) |
---|
39 | CXX_SWITCHES = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES) |
---|
40 | |
---|
41 | INCLUDES = \ |
---|
42 | -I. \ |
---|
43 | -I$(srcdir) \ |
---|
44 | -I$(includedir) |
---|
45 | |
---|
46 | RANLIB = @RANLIB@ |
---|
47 | AR = ar |
---|
48 | VPATH = $(srcdir):$(srcdir)/scew:$(srcdir)/b64 |
---|
49 | RM = rm -f |
---|
50 | |
---|
51 | CDEBUGFLAGS = -g -Wall |
---|
52 | |
---|
53 | LIBS = -lexpat -lz -lm -lstdc++ |
---|
54 | |
---|
55 | HEADERS = \ |
---|
56 | RpOutcome.h \ |
---|
57 | RpPtr.h \ |
---|
58 | RpBindingsDict.h \ |
---|
59 | RpBuffer.h \ |
---|
60 | RpBufferCHelper.h \ |
---|
61 | RpBufferCInterface.h \ |
---|
62 | RpDict.h \ |
---|
63 | RpEncode.h \ |
---|
64 | RpEntityRef.h \ |
---|
65 | RpFortranCommon.h \ |
---|
66 | RpLibrary.h \ |
---|
67 | RpLibraryCInterface.h \ |
---|
68 | RpLibraryFInterface.h \ |
---|
69 | RpLibraryFStubs.h \ |
---|
70 | RpOutcomeCHelper.h \ |
---|
71 | RpOutcomeCInterface.h \ |
---|
72 | RpSimpleBuffer.h \ |
---|
73 | RpUnits.h \ |
---|
74 | RpUnitsCInterface.h \ |
---|
75 | RpUnitsFInterface.h \ |
---|
76 | RpUnitsFStubs.h \ |
---|
77 | RpUnitsStd.h \ |
---|
78 | RpUtils.h \ |
---|
79 | RpUtilsCInterface.h \ |
---|
80 | RpUtilsFInterface.h \ |
---|
81 | RpUtilsFStubs.h \ |
---|
82 | rappture.h |
---|
83 | |
---|
84 | LOCAL_HEADERS = \ |
---|
85 | config.h |
---|
86 | |
---|
87 | SCEW_HEADERS = \ |
---|
88 | attribute.h \ |
---|
89 | element.h \ |
---|
90 | error.h \ |
---|
91 | parser.h \ |
---|
92 | scew.h \ |
---|
93 | scew_extras.h \ |
---|
94 | str.h \ |
---|
95 | tree.h \ |
---|
96 | types.h \ |
---|
97 | xattribute.h \ |
---|
98 | xelement.h \ |
---|
99 | xhandler.h \ |
---|
100 | xparser.h \ |
---|
101 | xprint.h \ |
---|
102 | xtree.h \ |
---|
103 | writer.h \ |
---|
104 | xerror.h |
---|
105 | |
---|
106 | # Build the scew and b64 libraries directly into Rappture for now. |
---|
107 | # Note: This works because of viewpath-ing. See the VPATH variable. |
---|
108 | B64_OBJS = \ |
---|
109 | cdecode.o \ |
---|
110 | cencode.o |
---|
111 | |
---|
112 | SCEW_OBJS = \ |
---|
113 | attribute.o \ |
---|
114 | element.o \ |
---|
115 | error.o \ |
---|
116 | parser.o \ |
---|
117 | scew_extras.o \ |
---|
118 | str.o \ |
---|
119 | tree.o \ |
---|
120 | writer.o \ |
---|
121 | xattribute.o \ |
---|
122 | xerror.o \ |
---|
123 | xhandler.o \ |
---|
124 | xparser.o \ |
---|
125 | xprint.o |
---|
126 | |
---|
127 | OBJS = \ |
---|
128 | RpBindingsDict.o \ |
---|
129 | RpBuffer.o \ |
---|
130 | RpBufferCInterface.o \ |
---|
131 | RpEncode.o \ |
---|
132 | RpEntityRef.o \ |
---|
133 | RpFortranCommon.o \ |
---|
134 | RpLibrary.o \ |
---|
135 | RpLibraryCInterface.o \ |
---|
136 | RpLibraryFInterface.o \ |
---|
137 | RpOutcome.o \ |
---|
138 | RpOutcomeCInterface.o \ |
---|
139 | RpPtr.o \ |
---|
140 | RpResult.o \ |
---|
141 | RpUnits.o \ |
---|
142 | RpUnitsCInterface.o \ |
---|
143 | RpUnitsFInterface.o \ |
---|
144 | RpUnitsStd.o \ |
---|
145 | RpUtils.o \ |
---|
146 | RpUtilsCInterface.o \ |
---|
147 | RpUtilsFInterface.o \ |
---|
148 | $(SCEW_OBJS) \ |
---|
149 | $(B64_OBJS) |
---|
150 | |
---|
151 | ifneq ($(DX_INC_SPEC),) |
---|
152 | HEADERS += \ |
---|
153 | RpDXWriter.h \ |
---|
154 | RpDXWriterFInterface.h \ |
---|
155 | RpDXWriterFStubs.h |
---|
156 | OBJS += \ |
---|
157 | RpDXWriter.o \ |
---|
158 | RpDXWriterFInterface.o |
---|
159 | endif |
---|
160 | |
---|
161 | name = rappture |
---|
162 | libname = lib$(name) |
---|
163 | lib = $(libname).a |
---|
164 | shared_lib = $(libname)$(SHLIB_SUFFIX) |
---|
165 | |
---|
166 | all: $(lib) $(shared_lib) |
---|
167 | |
---|
168 | $(lib): $(OBJS) |
---|
169 | $(RM) $@ |
---|
170 | $(AR) -r $@ $(OBJS) |
---|
171 | $(RANLIB) $@ |
---|
172 | |
---|
173 | $(shared_lib): $(OBJS) |
---|
174 | $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) \ |
---|
175 | $(LIB_SEARCH_DIRS) $(LIBS) |
---|
176 | |
---|
177 | install: install_libs install_headers |
---|
178 | |
---|
179 | install_libs: $(lib) $(shared_lib) |
---|
180 | $(INSTALL) -m 444 $(lib) $(libdir) |
---|
181 | $(INSTALL) -m 555 $(shared_lib) $(libdir) |
---|
182 | |
---|
183 | install_headers: |
---|
184 | $(MKDIR_P) -m 0755 $(incdir) |
---|
185 | for i in $(HEADERS) ; do \ |
---|
186 | $(INSTALL) -m 0444 $(srcdir)/$$i $(incdir) ; \ |
---|
187 | done |
---|
188 | for i in $(LOCAL_HEADERS) ; do \ |
---|
189 | $(INSTALL) -m 0444 $$i $(incdir) ; \ |
---|
190 | done |
---|
191 | |
---|
192 | .cc.o: |
---|
193 | $(CXX) $(CXX_SWITCHES) -c $? |
---|
194 | .c.o: |
---|
195 | $(CCC) $(CC_SWITCHES) -c $? |
---|
196 | |
---|
197 | clean: |
---|
198 | $(RM) $(OBJS) $(lib) $(shared_lib) |
---|
199 | |
---|
200 | distclean: clean |
---|
201 | $(RM) Makefile config.h *~ |
---|