source: branches/1.5/libs/rappture/Makefile.in @ 5901

Last change on this file since 5901 was 5901, checked in by gah, 9 years ago

first pass on new build

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