]> mj.ucw.cz Git - libucw.git/blob - examples/external-ucw-build/Makefile
Packages: Implemented `debian/mk --no-source'.
[libucw.git] / examples / external-ucw-build / Makefile
1 # Example Makefile for a stand-alone program using the libucw build system
2 # (c) 2007 Martin Mares <mj@ucw.cz>
3 # (c) 2008 Michal Vaner <vorner@ucw.cz>
4
5 # The default target
6 all: runtree programs
7
8 # Include configuration
9 s=.
10 -include obj/config.mk
11 obj/config.mk:
12         @echo "You need to run configure first." && false
13
14 # Do not show strange errors if the BUILDSYS is not set
15 # (it happens if noone called configure as reported above)
16 ifdef BUILDSYS
17
18 # We will use the libucw build system
19 include $(BUILDSYS)/Maketop
20
21 # Add the detected flags to all the global flags
22 CFLAGS+=$(LIBUCW_CFLAGS)
23 LIBS+=$(LIBUCW_LIBS)
24
25 # Programs we want to compile
26 PROGS+=$(o)/test
27
28 # And how they are created
29 $(o)/test: $(o)/test.o $(LIBUCW)
30
31 # And finally the default rules of the build system
32 include $(BUILDSYS)/Makebottom
33
34 endif