source: trunk/examples/c-example/Makefile.in @ 5119

Last change on this file since 5119 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: 1.5 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$(srcdir)/../../src/core \
21                  -I$(includedir)
22LIBS            = \
23                -L../../src/core -lrappture \
24                -L$(libdir) -lexpat -lz -lm
25VPATH           = $(srcdir)
26
27CXX_SWITCHES    = $(CXXFLAGS) $(INCLUDES) $(DEFINES)   
28CC_SWITCHES     = $(CFLAGS) $(INCLUDES) $(DEFINES)     
29
30FILES           = \
31                $(srcdir)/README \
32                $(srcdir)/compress.c \
33                $(srcdir)/compress.cc \
34                $(srcdir)/output.dx \
35                $(srcdir)/plot.cc \
36                $(srcdir)/plotc.c \
37                $(srcdir)/tool.xml \
38                $(srcdir)/tool2.xml \
39                Makefile
40
41destdir         = $(prefix)/examples/c-example
42
43
44PROGS           = \
45                compress \
46                compressc \
47                plot \
48                plotc \
49
50.PHONY: all install clean distclean
51
52all: $(PROGS)
53
54compress: $(srcdir)/compress.cc
55        $(CXX) $(CXX_SWITCHES) -o $@ $< $(LIBS)
56compressc: $(srcdir)/compress.c
57        $(CC) $(CC_SWITCHES) -o $@ $< $(LIBS)
58plot: $(srcdir)/plot.cc
59        $(CXX) $(CXX_SWITCHES) -o $@ $< $(LIBS)
60plotc: $(srcdir)/plotc.c
61        $(CC) $(CC_SWITCHES) -o $@ $< $(LIBS)
62
63install: all
64        $(MKDIR_P) -m 0755 $(destdir)
65        for i in $(FILES) ; do \
66          $(INSTALL) -m 0444  $$i $(destdir) ; \
67        done
68        for i in $(PROGS) ; do \
69          $(INSTALL) -m 0555 $$i $(destdir) ; \
70        done
71
72clean:
73        $(RM) $(PROGS) run*.xml
74
75distclean: clean
76        $(RM) Makefile *~
Note: See TracBrowser for help on using the repository browser.