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

Last change on this file since 1059 was 1059, checked in by gah, 16 years ago
File size: 3.4 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@
14
15CXX             = @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
19CC              = $(CXX)
20CCC             = @CC@
21CFLAGS_DEBUG    = @CFLAGS_DEBUG@ -Wall
22CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
23STLIB_LD        = @STLIB_LD@
24SHLIB_LD        = @SHLIB_LD@
25SHLIB_CFLAGS    = @SHLIB_CFLAGS@
26SHLIB_LDFLAGS   = @SHLIB_LDFLAGS@
27SHLIB_SUFFIX    = @SHLIB_SUFFIX@
28CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
29LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
30CFLAGS          = @CFLAGS@
31
32CC_SWITCHES     = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES)
33CXX_SWITCHES    = $(CFLAGS) $(CFLAGS_DEBUG) $(INCLUDES) $(DEFINES)
34
35INCLUDES        = -I$(srcdir) \
36                  -I$(includedir)
37
38RANLIB          = @RANLIB@
39AR              = ar
40VPATH           = $(srcdir):$(srcdir)/scew:$(srcdir)/b64
41RM              = rm -f
42
43CDEBUGFLAGS     = -g -Wall
44
45LIBS            = -lexpat -lz -lm -lstdc++
46
47HEADERS = \
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
77SCEW_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.
98B64_OBJS        = \
99                cdecode.o \
100                cencode.o
101
102SCEW_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
117OBJS =          \
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
142name            = rappture
143libname         = lib$(name)
144lib             = $(libname).a
145shared_lib      = $(libname)$(SHLIB_SUFFIX)
146
147all: $(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
158install: install_libs install_headers
159
160install_libs: $(lib)  $(shared_lib)
161        $(INSTALL) -m 444 $(lib) $(libdir)
162        $(INSTALL) -m 555 $(shared_lib) $(libdir)
163
164install_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
175clean:
176        $(RM) $(OBJS) $(lib) $(shared_lib)
177
178distclean: clean
179        $(RM) Makefile *~
Note: See TracBrowser for help on using the repository browser.