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

Last change on this file since 1082 was 1082, checked in by gah, 16 years ago

update makefile with mkdir_p

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