[1018] | 1 | |
---|
| 2 | bindir = @bindir@ |
---|
[1270] | 3 | datadir = @datadir@ |
---|
| 4 | datarootdir = @datarootdir@ |
---|
[1018] | 5 | exec_prefix = @exec_prefix@ |
---|
| 6 | includedir = @includedir@ |
---|
| 7 | libdir = @libdir@ |
---|
| 8 | mandir = @mandir@ |
---|
| 9 | prefix = @prefix@ |
---|
[1270] | 10 | srcdir = @srcdir@ |
---|
| 11 | incdir = $(prefix)/include |
---|
[1018] | 12 | |
---|
[1270] | 13 | INSTALL = @INSTALL@ |
---|
| 14 | MKDIR_P = @MKDIR_P@ |
---|
[3717] | 15 | SVN_VERSION := $(shell svnversion $(srcdir)) |
---|
| 16 | RAPPTURE_VERSION = @PACKAGE_VERSION@ |
---|
[1018] | 17 | CXX = @CXX@ |
---|
[1059] | 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) |
---|
[1270] | 22 | CCC = @CC@ |
---|
[1018] | 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@ |
---|
[1887] | 32 | CFLAGS = @CFLAGS@ -fPIC |
---|
[1825] | 33 | DX_LIB_SPEC = @DX_LIB_SPEC@ |
---|
| 34 | DX_INC_SPEC = @DX_INC_SPEC@ |
---|
[3717] | 35 | DEFINES = -DSVN_VERSION=\"$(SVN_VERSION)\" \ |
---|
| 36 | -DRAPPTURE_VERSION=\"$(RAPPTURE_VERSION)\" |
---|
[1018] | 37 | |
---|
[3717] | 38 | CC_SWITCHES = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES) |
---|
| 39 | CXX_SWITCHES = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES) |
---|
[1018] | 40 | |
---|
[1270] | 41 | INCLUDES = \ |
---|
| 42 | -I. \ |
---|
| 43 | -I$(srcdir) \ |
---|
| 44 | -I$(includedir) |
---|
[1018] | 45 | |
---|
[1270] | 46 | RANLIB = @RANLIB@ |
---|
| 47 | AR = ar |
---|
| 48 | VPATH = $(srcdir):$(srcdir)/scew:$(srcdir)/b64 |
---|
| 49 | RM = rm -f |
---|
[1018] | 50 | |
---|
| 51 | CDEBUGFLAGS = -g -Wall |
---|
| 52 | |
---|
[1270] | 53 | LIBS = -lexpat -lz -lm -lstdc++ |
---|
[1018] | 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 \ |
---|
[1038] | 72 | RpSimpleBuffer.h \ |
---|
[1018] | 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 \ |
---|
[1270] | 82 | rappture.h |
---|
[1018] | 83 | |
---|
[1873] | 84 | LOCAL_HEADERS = \ |
---|
| 85 | config.h |
---|
[1825] | 86 | |
---|
[1041] | 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 \ |
---|
[1270] | 103 | writer.h \ |
---|
| 104 | xerror.h |
---|
[1041] | 105 | |
---|
[1055] | 106 | # Build the scew and b64 libraries directly into Rappture for now. |
---|
[1018] | 107 | # Note: This works because of viewpath-ing. See the VPATH variable. |
---|
[1040] | 108 | B64_OBJS = \ |
---|
| 109 | cdecode.o \ |
---|
| 110 | cencode.o |
---|
| 111 | |
---|
[1018] | 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 \ |
---|
[1270] | 125 | xprint.o |
---|
[1018] | 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 \ |
---|
[1040] | 148 | $(SCEW_OBJS) \ |
---|
[1051] | 149 | $(B64_OBJS) |
---|
[1018] | 150 | |
---|
[1825] | 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 | |
---|
[1270] | 161 | name = rappture |
---|
| 162 | libname = lib$(name) |
---|
| 163 | lib = $(libname).a |
---|
| 164 | shared_lib = $(libname)$(SHLIB_SUFFIX) |
---|
[1018] | 165 | |
---|
| 166 | all: $(lib) $(shared_lib) |
---|
| 167 | |
---|
| 168 | $(lib): $(OBJS) |
---|
| 169 | $(RM) $@ |
---|
[1051] | 170 | $(AR) -r $@ $(OBJS) |
---|
[1018] | 171 | $(RANLIB) $@ |
---|
| 172 | |
---|
| 173 | $(shared_lib): $(OBJS) |
---|
| 174 | $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) \ |
---|
[1051] | 175 | $(LIB_SEARCH_DIRS) $(LIBS) |
---|
[1018] | 176 | |
---|
| 177 | install: install_libs install_headers |
---|
| 178 | |
---|
| 179 | install_libs: $(lib) $(shared_lib) |
---|
| 180 | $(INSTALL) -m 444 $(lib) $(libdir) |
---|
[1051] | 181 | $(INSTALL) -m 555 $(shared_lib) $(libdir) |
---|
[1018] | 182 | |
---|
[1051] | 183 | install_headers: |
---|
[1944] | 184 | $(MKDIR_P) -m 0755 $(incdir) |
---|
[1018] | 185 | for i in $(HEADERS) ; do \ |
---|
[2061] | 186 | $(INSTALL) -m 0444 $(srcdir)/$$i $(incdir) ; \ |
---|
[1018] | 187 | done |
---|
[1873] | 188 | for i in $(LOCAL_HEADERS) ; do \ |
---|
[2061] | 189 | $(INSTALL) -m 0444 $$i $(incdir) ; \ |
---|
[1873] | 190 | done |
---|
[1018] | 191 | |
---|
[1051] | 192 | .cc.o: |
---|
| 193 | $(CXX) $(CXX_SWITCHES) -c $? |
---|
[1018] | 194 | .c.o: |
---|
[4118] | 195 | $(CCC) $(CC_SWITCHES) -c $? |
---|
[1018] | 196 | |
---|
[1051] | 197 | clean: |
---|
[1018] | 198 | $(RM) $(OBJS) $(lib) $(shared_lib) |
---|
| 199 | |
---|
| 200 | distclean: clean |
---|
[3471] | 201 | $(RM) Makefile config.h *~ |
---|