Debian Codegraph @

debian/adhoc/examples/Makefile

raw
1 # /usr/share/doc/libscscp-doc/examples/Makefile
2 #
3 # Ad hoc Makefile for building and playing with the sample sources
4 # distributed within the debian package libscscp-doc.
5 #
6 # Recommended usage:
7 # create a dedicated folder somewhere in your HOME directory;
8 # link all the files in /usr/share/doc/libscscp-doc/examples in the dedicated folder;
9 # launch this Makefile in the dedicated folder:
10 # $ make ;
11 # for a basic cleanup, consider the clean target:
12 # $ make clean ;
13 # for an entire cleanup, the maintainer-clean target:
14 # $ make maintainer-clean ;
15 # for other targets, just read the Makefile.
16 #
17 # written for Debian by Jerome Benoit <[email protected]>
18 # on behalf of the Debian Science Team
19 # copyright: 2016-2018 Jerome Benoit <[email protected]>
20 # distributed under the terms and conditions of GPL version 3 or later
21 #
22
23 default: all
24
25 PROGRAMS = \
26 $(patsubst %.c,%,$(wildcard *.c)) \
27 $(patsubst %.cpp,%,$(wildcard *.cpp))
28
29 CFLAGS = $(shell pkg-config libscscp-c --cflags)
30 LDLIBS = $(shell pkg-config libscscp-c --libs)
31
32 CXXFLAGS = $(shell pkg-config libscscp-cxx --cflags)
33 LDXXLIBS = $(shell pkg-config libscscp-cxx --libs)
34
35 all: build check
36
37 build: $(PROGRAMS)
38
39 check: build
40
41 clean:
42 $(RM) $(PROGRAMS)
43
44 maintainer-clean: clean
45
46 % : %.cpp
47 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(LDXXLIBS)