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