source: trunk/src/core/Makefile.in @ 4503

Last change on this file since 4503 was 4364, checked in by ldelgass, 10 years ago

Fix for exported source package build: svnversion will return "Unversioned
directory" when run on an exported source tree, but the space causes a compiler
error. Replace this string with 'unknown'. A better fix would be to capture
the svn revision at the time the tree is exported. See nanohub ticket
#265649 for a report of the problem on Mac OS X (that was with clang, but I
verified it occurs with gcc on Linux as well).

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) | sed 's/Unversioned directory/unknown/')
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   = @SHLIB_LDFLAGS@
29SHLIB_SUFFIX    = @SHLIB_SUFFIX@
30CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
31LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
32CFLAGS          = @CFLAGS@ -fPIC
33DX_LIB_SPEC     = @DX_LIB_SPEC@
34DX_INC_SPEC     = @DX_INC_SPEC@
35DEFINES         = -DSVN_VERSION=\"$(SVN_VERSION)\" \
36                  -DRAPPTURE_VERSION=\"$(RAPPTURE_VERSION)\"
37
38CC_SWITCHES     = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES)
39CXX_SWITCHES    = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES)
40
41INCLUDES        = \
42                -I. \
43                -I$(srcdir) \
44                -I$(includedir)
45
46RANLIB          = @RANLIB@
47AR              = ar
48VPATH           = $(srcdir):$(srcdir)/scew:$(srcdir)/b64
49RM              = rm -f
50
51CDEBUGFLAGS     = -g -Wall
52
53LIBS            = -lexpat -lz -lm -lstdc++
54
55HEADERS = \
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 \
72                RpSimpleBuffer.h \
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 \
82                rappture.h
83
84LOCAL_HEADERS = \
85                config.h
86
87SCEW_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 \
103                writer.h \
104                xerror.h
105
106# Build the scew and b64 libraries directly into Rappture for now. 
107# Note: This works because of viewpath-ing. See the VPATH variable.
108B64_OBJS        = \
109                cdecode.o \
110                cencode.o
111
112SCEW_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 \
125                xprint.o
126
127OBJS =          \
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  \
148                $(SCEW_OBJS) \
149                $(B64_OBJS)
150
151ifneq ($(DX_INC_SPEC),)
152HEADERS +=      \
153                RpDXWriter.h \
154                RpDXWriterFInterface.h \
155                RpDXWriterFStubs.h
156OBJS +=         \
157                RpDXWriter.o \
158                RpDXWriterFInterface.o
159endif
160
161name        = rappture
162libname     = lib$(name)
163lib         = $(libname).a
164shared_lib  = $(libname)$(SHLIB_SUFFIX)
165
166all: $(lib) $(shared_lib)
167
168$(lib): $(OBJS)
169        $(RM) $@
170        $(AR) -r $@ $(OBJS)
171        $(RANLIB) $@
172
173$(shared_lib): $(OBJS)
174        $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) \
175                $(LIB_SEARCH_DIRS) $(LIBS)
176
177install: install_libs install_headers
178
179install_libs: $(lib)  $(shared_lib)
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.