]> mj.ucw.cz Git - libucw.git/blob - examples/internal/Makefile
Merge branch 'master' into dev-opt
[libucw.git] / examples / internal / Makefile
1 # Example Makefile for a stand-alone program using the libucw build system
2 # (c) 2007 Martin Mares <mj@ucw.cz>
3
4 # The default target
5 all: runtree programs
6
7 # Include configuration
8 s=.
9 -include obj/config.mk
10 obj/config.mk:
11         @echo "You need to run configure first." && false
12
13 BUILDSYS=$(s)/build
14
15 # We will use the libucw build system
16 include $(BUILDSYS)/Maketop
17
18 # Set up names of common libraries (to avoid forward references in rules)
19 LIBCHARSET=$(o)/charset/libucw-charset.pc
20 LIBIMAGES=$(o)/images/libucw-images.pc
21
22 # Include makefiles of libraries we wish to use
23 include $(s)/ucw/Makefile
24 include $(s)/charset/Makefile
25 include $(s)/images/Makefile
26
27 # Programs we want to compile
28 PROGS+=$(o)/test
29 $(o)/test: $(o)/test.o $(LIBUCW) $(LIBCHARSET) $(LIBIMAGES)
30
31 # All tests (%-t) get automatically linked with libucw
32 TESTING_DEPS=$(LIBUCW)
33
34 # And finally the default rules of the build system
35 include $(BUILDSYS)/Makebottom