source: trunk/src/objects/Makefile.in @ 4600

Last change on this file since 4600 was 3471, checked in by ldelgass, 11 years ago

Makefile fixes: make 'install' target always depend on 'all' target. This
ensures that an up to date build exists before installing, and also permits
the use of "make install" in place of "make all install" or "make all; make install". It doesn't affect the existing build scripts. Likewise, make 'distclean'
always depend on 'clean'. Remove empty contour objects example, as there is no
corresponding object class. Also declare all the standard targets 'all, install,
etc' in the .PHONY section for performance.

File size: 2.8 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@
16CC              = $(CXX)
17CCC             = @CC@
18CFLAGS_DEBUG    = @CFLAGS_DEBUG@
19CFLAGS_WARNING  = -Wall
20CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
21STLIB_LD        = @STLIB_LD@
22SHLIB_LD        = @SHLIB_LD@
23SHLIB_CFLAGS    = @SHLIB_CFLAGS@
24SHLIB_LDFLAGS   = @SHLIB_LDFLAGS@
25SHLIB_SUFFIX    = @SHLIB_SUFFIX@
26CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
27LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
28CFLAGS          = @CFLAGS@ -fPIC
29FFMPEG          = @HAVE_FFMPEG_LIBS@
30RM              = rm -f
31CC_SWITCHES = $(CFLAGS) $(INCLUDES) $(DEFINES) $(CFLAGS_DEBUG)
32
33INCLUDES    = \
34                -I. \
35                -I../core \
36                -I$(srcdir) \
37                -I$(srcdir)/../core \
38                -I$(includedir)
39LIBS        = -L../core -lrappture
40
41
42RANLIB      = @RANLIB@
43AR          = ar
44VPATH       = $(srcdir)
45
46# tell make where to find the expat & libscew headers
47INCL_RP_DEPS    = -I$(includedir)
48
49# define our compiling environment
50LN              = ln -s
51
52#               RpDXReader.h \
53#               RpDXWriter.h \
54
55HEADERS = \
56                RpAccessor.h \
57                RpArray1D.h \
58                RpArray1DUniform.h \
59                RpAxisMarker.h \
60                RpBoolean.h \
61                RpChain.h \
62                RpChainHelper.h \
63                RpChoice.h \
64                RpCurve.h \
65                RpInt.h \
66                RpHashHelper.h \
67                RpHistogram.h \
68                RpLibObj.h \
69                RpLibStorage.h \
70                RpNumber.h \
71                RpParserXML.h \
72                RpPath.h \
73                RpPlot.h \
74                RpPool.h \
75                RpScatter.h \
76                RpString.h \
77                RpTest.h \
78                RpTree.h \
79                RpObjConfig.h \
80                RpObject.h
81
82LOCAL_HEADERS = \
83                RpHash.h
84
85#               RpDXReader.o \
86#               RpDXWriter.o \
87
88OBJS = \
89                RpArray1D.o \
90                RpArray1DUniform.o \
91                RpAxisMarker.o \
92                RpBoolean.o \
93                RpChain.o \
94                RpChoice.o \
95                RpCurve.o \
96                RpChainHelper.o \
97                RpHash.o \
98                RpHashHelper.o \
99                RpHistogram.o \
100                RpLibObj.o \
101                RpLibStorage.o \
102                RpNumber.o \
103                RpParserXML.o \
104                RpPath.o \
105                RpPlot.o \
106                RpPool.o \
107                RpScatter.o \
108                RpString.o \
109                RpTest.o \
110                RpTree.o \
111                RpUtils2.o \
112                RpObject.o
113
114name        = RpObjects
115lib         = lib$(name).a
116shared_lib  = lib$(name)$(SHLIB_SUFFIX)
117
118all: build_lib
119
120build_lib: $(lib) $(shared_lib)
121
122$(shared_lib): $(OBJS)
123        $(RM) $@
124        $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) \
125                $(LIB_SEARCH_DIRS) $(LIBS)  -lstdc++ -lexpat
126
127$(lib): $(OBJS)
128        $(RM) $@
129        $(AR) -r $@ $(OBJS)
130        $(RANLIB) $@
131
132install: $(lib) $(shared_lib)
133        $(INSTALL) -m 444 $(lib) $(libdir)
134        $(INSTALL) -m 555 $(shared_lib) $(libdir)
135        for i in $(HEADERS) ; do \
136          $(INSTALL) -m 444  $(srcdir)/$$i $(incdir) ; \
137        done
138        for i in $(LOCAL_HEADERS) ; do \
139          $(INSTALL) -m 444  $$i $(incdir) ; \
140        done
141
142.cc.o:
143        $(CXX) $(CC_SWITCHES) -c $?
144.c.o:
145        $(CCC) $(CC_SWITCHES) -c $?
146
147clean:
148        $(RM) $(OBJS) $(lib) $(shared_lib)
149
150distclean: clean
151        rm Makefile RpHash.h
Note: See TracBrowser for help on using the repository browser.