source: trunk/examples/objects/xmlparser/Makefile.in @ 3471

Last change on this file since 3471 was 3471, checked in by ldelgass, 8 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: 1.6 KB
Line 
1
2bindir          = @bindir@
3datadir         = @datadir@
4datarootdir     = @datarootdir@
5exec_prefix     = @exec_prefix@
6includedir      = @includedir@
7libdir          = @libdir@
8mandir          = @mandir@
9prefix          = @prefix@
10srcdir          = @srcdir@
11
12INSTALL         = @INSTALL@
13MKDIR_P         = @MKDIR_P@
14
15CC              = @CC@
16CFLAGS          = @CFLAGS@
17CXX             = @CXX@
18CXXFLAGS        = @CFLAGS@
19DEFINES         = -g -Wall
20INCLUDES        = -I../../../src/core \
21                  -I../../../src/objects \
22                  -I$(srcdir)/../../../src/core \
23                  -I$(srcdir)/../../../src/objects \
24                  -I$(includedir)
25LIBS    = \
26                -L../../../src/core -lrappture \
27                -L../../../src/objects -lRpObjects\
28                -L$(libdir) -lexpat -lz -lm
29VPATH   = $(srcdir)
30
31CXX_SWITCHES    = $(CXXFLAGS) $(INCLUDES) $(DEFINES)
32CC_SWITCHES     = $(CFLAGS) $(INCLUDES) $(DEFINES)
33
34FILES   = \
35                $(srcdir)/xmlparser.cc \
36                $(srcdir)/xmlparser_1_0_in.xml \
37                $(srcdir)/xmlparser_1_1_in.xml \
38                $(srcdir)/xmlparser_1_0_out.xml \
39                $(srcdir)/xmlparser_1_1_out.xml \
40                $(srcdir)/xmlparser_2_0_in.xml \
41                $(srcdir)/xmlparser_5_0_in.xml \
42                $(srcdir)/tool.xml \
43                Makefile
44
45destdir = $(prefix)/examples/objects/xmlparser
46
47
48PROGS   = \
49                xmlparser
50
51.PHONY: all install clean distclean
52
53all: $(PROGS)
54
55xmlparser: $(srcdir)/xmlparser.cc
56        $(CXX) $(CXX_SWITCHES) -o $@ $< $(LIBS)
57
58install: all
59        $(MKDIR_P) -m 0755 $(destdir)
60        for i in $(FILES) ; do \
61          $(INSTALL) -m 0444  $$i $(destdir) ; \
62        done
63        for i in $(PROGS) ; do \
64          $(INSTALL) -m 0555 $$i $(destdir) ; \
65        done
66
67clean:
68        $(RM) $(PROGS)
69
70distclean: clean
71        $(RM) Makefile *~
Note: See TracBrowser for help on using the repository browser.