source: trunk/Makefile.kmk@ 3042

Last change on this file since 3042 was 3040, checked in by bird, 19 years ago

added flex

File size: 1.8 KB
Line 
1# $Id: $
2## @file
3#
4# Top-Level Makefile.
5# This is not a standard kBuild makefile, the footer is not included.
6#
7# Copyright (c) 2005-2006 knut st. osmundsen <bird@anduin.net>
8#
9#
10# This file is part of kNIX.
11#
12# kNIX is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# kNIX is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with kNIX; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25#
26#
27
28
29
30DEPTH = .
31include $(PATH_KBUILD)/header.kmk
32
33## SUBDIRS
34# The subdirectories to traverse.
35SUBDIRS = \
36 baselayout \
37 emx \
38 yacc \
39 coreutils \
40 flex \
41 ash \
42 diffutils \
43 ncurses \
44 texinfo \
45
46# libc binutils gcc grep sed ...
47
48## def_do_subdir
49# Generate rules to do one subdirectory.
50# @remark This is evaluated twice.
51define def_do_subdir
52
53# build and install
54subdir_$(subdir)_all:
55 $$(MAKE) -C $(subdir)
56
57# install
58subdir_$(subdir)_install:
59 $$(MAKE) -C $(subdir) install
60
61# packing
62subdir_$(subdir)_packing:
63 $$(MAKE) -C $(subdir) packing
64
65.NOTPARALLEL: subdir_$(subdir)_all subdir_$(subdir)_install subdir_$(subdir)_packing
66endef
67
68$(foreach subdir,$(SUBDIRS),$(eval $(def_do_subdir)))
69
70#
71# A pass
72#
73all_subdirs: | $(foreach subdir,$(SUBDIRS), subdir_$(subdir)_all)
74
75.NOTPARALLEL: all_subdirs
76
77
78#
79# The default rule.
80#
81all_recursive: | all_subdirs
82
83.NOTPARALLEL: all_recursive
84
Note: See TracBrowser for help on using the repository browser.