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