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@ |
---|
32 | |
---|
33 | CC_SWITCHES = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES) |
---|
34 | CXX_SWITCHES = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES) |
---|
35 | |
---|
36 | INCLUDES = \ |
---|
37 | -I. \ |
---|
38 | -I$(srcdir) \ |
---|
39 | -I$(includedir) |
---|
40 | |
---|
41 | RANLIB = @RANLIB@ |
---|
42 | AR = ar |
---|
43 | VPATH = $(srcdir):$(srcdir)/scew:$(srcdir)/b64 |
---|
44 | RM = rm -f |
---|
45 | |
---|
46 | CDEBUGFLAGS = -g -Wall |
---|
47 | |
---|
48 | LIBS = -lexpat -lz -lm -lstdc++ |
---|
49 | |
---|
50 | HEADERS = \ |
---|
51 | RpOutcome.h \ |
---|
52 | RpPtr.h \ |
---|
53 | RpBindingsDict.h \ |
---|
54 | RpBuffer.h \ |
---|
55 | RpBufferCHelper.h \ |
---|
56 | RpBufferCInterface.h \ |
---|
57 | RpDict.h \ |
---|
58 | RpDXWriter.h \ |
---|
59 | RpDXWriterFInterface.h \ |
---|
60 | RpDXWriterFStubs.h \ |
---|
61 | RpEncode.h \ |
---|
62 | RpEntityRef.h \ |
---|
63 | RpFortranCommon.h \ |
---|
64 | RpLibrary.h \ |
---|
65 | RpLibraryCInterface.h \ |
---|
66 | RpLibraryFInterface.h \ |
---|
67 | RpLibraryFStubs.h \ |
---|
68 | RpOutcomeCHelper.h \ |
---|
69 | RpOutcomeCInterface.h \ |
---|
70 | RpSimpleBuffer.h \ |
---|
71 | RpUnits.h \ |
---|
72 | RpUnitsCInterface.h \ |
---|
73 | RpUnitsFInterface.h \ |
---|
74 | RpUnitsFStubs.h \ |
---|
75 | RpUnitsStd.h \ |
---|
76 | RpUtils.h \ |
---|
77 | RpUtilsCInterface.h \ |
---|
78 | RpUtilsFInterface.h \ |
---|
79 | RpUtilsFStubs.h \ |
---|
80 | rappture.h |
---|
81 | |
---|
82 | SCEW_HEADERS = \ |
---|
83 | attribute.h \ |
---|
84 | element.h \ |
---|
85 | error.h \ |
---|
86 | parser.h \ |
---|
87 | scew.h \ |
---|
88 | scew_extras.h \ |
---|
89 | str.h \ |
---|
90 | tree.h \ |
---|
91 | types.h \ |
---|
92 | xattribute.h \ |
---|
93 | xelement.h \ |
---|
94 | xhandler.h \ |
---|
95 | xparser.h \ |
---|
96 | xprint.h \ |
---|
97 | xtree.h \ |
---|
98 | writer.h \ |
---|
99 | xerror.h |
---|
100 | |
---|
101 | # Build the scew and b64 libraries directly into Rappture for now. |
---|
102 | # Note: This works because of viewpath-ing. See the VPATH variable. |
---|
103 | B64_OBJS = \ |
---|
104 | cdecode.o \ |
---|
105 | cencode.o |
---|
106 | |
---|
107 | SCEW_OBJS = \ |
---|
108 | attribute.o \ |
---|
109 | element.o \ |
---|
110 | error.o \ |
---|
111 | parser.o \ |
---|
112 | scew_extras.o \ |
---|
113 | str.o \ |
---|
114 | tree.o \ |
---|
115 | writer.o \ |
---|
116 | xattribute.o \ |
---|
117 | xerror.o \ |
---|
118 | xhandler.o \ |
---|
119 | xparser.o \ |
---|
120 | xprint.o |
---|
121 | |
---|
122 | OBJS = \ |
---|
123 | RpBindingsDict.o \ |
---|
124 | RpBuffer.o \ |
---|
125 | RpBufferCInterface.o \ |
---|
126 | RpDXWriter.o \ |
---|
127 | RpDXWriterFInterface.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 | name = rappture |
---|
149 | libname = lib$(name) |
---|
150 | lib = $(libname).a |
---|
151 | shared_lib = $(libname)$(SHLIB_SUFFIX) |
---|
152 | |
---|
153 | all: $(lib) $(shared_lib) |
---|
154 | |
---|
155 | $(lib): $(OBJS) |
---|
156 | $(RM) $@ |
---|
157 | $(AR) -r $@ $(OBJS) |
---|
158 | $(RANLIB) $@ |
---|
159 | |
---|
160 | $(shared_lib): $(OBJS) |
---|
161 | $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) \ |
---|
162 | $(LIB_SEARCH_DIRS) $(LIBS) |
---|
163 | |
---|
164 | install: install_libs install_headers |
---|
165 | |
---|
166 | install_libs: $(lib) $(shared_lib) |
---|
167 | $(INSTALL) -m 444 $(lib) $(libdir) |
---|
168 | $(INSTALL) -m 555 $(shared_lib) $(libdir) |
---|
169 | |
---|
170 | install_headers: |
---|
171 | $(MKDIR_P) $(incdir) |
---|
172 | for i in $(HEADERS) ; do \ |
---|
173 | $(INSTALL) -m 444 $(srcdir)/$$i $(incdir) ; \ |
---|
174 | done |
---|
175 | |
---|
176 | .cc.o: |
---|
177 | $(CXX) $(CXX_SWITCHES) -c $? |
---|
178 | .c.o: |
---|
179 | $(CCC) $(CC_SWITCHES)-c $? |
---|
180 | |
---|
181 | clean: |
---|
182 | $(RM) $(OBJS) $(lib) $(shared_lib) |
---|
183 | |
---|
184 | distclean: clean |
---|
185 | $(RM) Makefile *~ |
---|