summaryrefslogtreecommitdiffstats
path: root/kBuild/doc/example1/Makefile.kmk
blob: ecb93509629c72e5a20fd493723f5c4807e83f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# $Id: Makefile.kmk 2343 2009-04-19 21:44:50Z bird $
## @file
# kBuild Example no. 1 - Makefile.kmk - The top-level makefile.
#

#
# The author disclaims copyright to this example script and places
# it in the public domain.
#
# include full-legal-disclaimer.kmk
#

SUB_DEPTH = .
include $(KBUILD_PATH)/subheader.kmk

#
# Include sub-makefiles.
#
include $(PATH_CURRENT)/libhello/Makefile.kmk

#
# The targets.
#
PROGRAMS += \
	hello \
	hellolib

#
# Hello world program.
#
hello_TEMPLATE = ExampleNo1Exe
hello_SOURCES = hello.c

#
# A hello world variant that has some of the code in the libhello directory,
# i.e. linking with a library built by the sub-makefile included above.
#
hellolib_TEMPLATE = ExampleNo1Exe
hellolib_SOURCES = hellolib.c
hellolib_LIBS = $(libhello_1_TARGET)

include $(FILE_KBUILD_SUB_FOOTER)