1 | # $Id: gnumake-header.kmk 723 2006-12-15 02:54:52Z bird $
|
---|
2 | ## @file
|
---|
3 | #
|
---|
4 | # kBuild - Additional header for use when bootstrapping kBuild using Vanilla GNU Make.
|
---|
5 | #
|
---|
6 | # Copyright (c) 2004-2006 knut st. osmundsen <bird-srcspam@anduin.net>
|
---|
7 | #
|
---|
8 | #
|
---|
9 | # This file is part of kBuild.
|
---|
10 | #
|
---|
11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # kBuild is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with kBuild; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
24 | #
|
---|
25 | #
|
---|
26 |
|
---|
27 | #
|
---|
28 | # Disable some features to make it work.
|
---|
29 | #
|
---|
30 | NO_COMPILE_CMDS_DEPS := 1
|
---|
31 | NO_LINK_CMDS_DEPS := 1
|
---|
32 | sinclude $(PATH_KBUILD)/StampOutPredefines.kmk
|
---|
33 | $(warning kBuild: Using vanilla GNU make isn't safe for anything but kBuild bootstrapping!)
|
---|
34 |
|
---|
35 |
|
---|
36 | #
|
---|
37 | # Default variables.
|
---|
38 | #
|
---|
39 | ifeq ($(MAKEFLAGS),$(MAKEFLAGS:R=x))
|
---|
40 | # add the -R makeflag to avoid doing this for submakes
|
---|
41 | MAKEFLAGS := R$(MAKEFLAGS)
|
---|
42 |
|
---|
43 | define def_undefine_default
|
---|
44 | ifeq ($(origin $1), default)
|
---|
45 | $1:=
|
---|
46 | endif
|
---|
47 | endef
|
---|
48 |
|
---|
49 | _DEFAULT_VARIABLES := .LIBPATTERNS .VARIABLES AR ARFLAGS AS CC CHECKOUT,v CO COFLAGS COMPILE.C COMPILE.F COMPILE.S COMPILE.c COMPILE.cc COMPILE.cpp COMPILE.def COMPILE.f COMPILE.mod COMPILE.p COMPILE.r COMPILE.s CPP CTANGLE CWEAVE CXX F77 F77FLAGS FC GET LD LEX LEX.l LINK.C LINK.F LINK.S LINK.c LINK.cc LINK.cpp LINK.f LINK.o LINK.p LINK.r LINK.s LINT LINT.c M2C MAKEINFO OUTPUT_OPTION PC PREPROCESS.F PREPROCESS.S PREPROCESS.r RM TANGLE TEX TEXI2DVI WEAVE YACC YACC.y
|
---|
50 | $(foreach i, $(_DEFAULT_VARIABLES), $(eval $(call def_undefine_default,$(i))))
|
---|
51 | _DEFAULT_VARIABLES :=
|
---|
52 | def_undefine_default :=
|
---|
53 | endif
|
---|
54 |
|
---|
55 | #
|
---|
56 | # Suffixes.
|
---|
57 | #
|
---|
58 | .SUFFIXES:
|
---|
59 | SUFFIXES :=
|
---|
60 |
|
---|
61 | #
|
---|
62 | # Implicit rules
|
---|
63 | #
|
---|
64 | ifeq ($(MAKEFLAGS),$(MAKEFLAGS:r=x))
|
---|
65 | MAKEFLAGS := r$(MAKEFLAGS)
|
---|
66 | # add the -r makeflag to avoid doing this for submakes
|
---|
67 |
|
---|
68 | %.C:
|
---|
69 | %.F:
|
---|
70 | %.S:
|
---|
71 | %.a:
|
---|
72 | %.c:
|
---|
73 | %.c: %.l
|
---|
74 | %.c: %.w
|
---|
75 | %.c: %.w %.ch
|
---|
76 | %.c: %.y
|
---|
77 | %.cc:
|
---|
78 | %.ch:
|
---|
79 | %.cpp:
|
---|
80 | %.def:
|
---|
81 | %.dll:
|
---|
82 | %.dvi:
|
---|
83 | %.dvi: %.tex
|
---|
84 | %.dvi: %.texi
|
---|
85 | %.dvi: %.texinfo
|
---|
86 | %.dvi: %.txinfo
|
---|
87 | %.el:
|
---|
88 | %.elc:
|
---|
89 | %.exe:
|
---|
90 | %.f:
|
---|
91 | %.f: %.F
|
---|
92 | %.f: %.r
|
---|
93 | %.h:
|
---|
94 | %.info:
|
---|
95 | %.info: %.texi
|
---|
96 | %.info: %.texinfo
|
---|
97 | %.info: %.txinfo
|
---|
98 | %.l:
|
---|
99 | %.lib:
|
---|
100 | %.ln:
|
---|
101 | %.ln: %.c
|
---|
102 | %.ln: %.l
|
---|
103 | %.ln: %.y
|
---|
104 | %.mod:
|
---|
105 | %.o:
|
---|
106 | %.o: %.C
|
---|
107 | %.o: %.F
|
---|
108 | %.o: %.S
|
---|
109 | %.o: %.c
|
---|
110 | %.o: %.cc
|
---|
111 | %.o: %.cpp
|
---|
112 | %.o: %.f
|
---|
113 | %.o: %.mod
|
---|
114 | %.o: %.p
|
---|
115 | %.o: %.r
|
---|
116 | %.o: %.s
|
---|
117 | %.obj:
|
---|
118 | %.out:
|
---|
119 | %.out: %
|
---|
120 | %.p:
|
---|
121 | %.p: %.web
|
---|
122 | %.r:
|
---|
123 | %.r: %.l
|
---|
124 | %.s:
|
---|
125 | %.s: %.S
|
---|
126 | %.sh:
|
---|
127 | %.sym:
|
---|
128 | %.sym: %.def
|
---|
129 | %.tex:
|
---|
130 | %.tex: %.w
|
---|
131 | %.tex: %.w %.ch
|
---|
132 | %.tex: %.web
|
---|
133 | %.texi:
|
---|
134 | %.texinfo:
|
---|
135 | %.txinfo:
|
---|
136 | %.w:
|
---|
137 | %.web:
|
---|
138 | %.y:
|
---|
139 | %: %.C
|
---|
140 | %: %.F
|
---|
141 | %: %.S
|
---|
142 | %: %.c
|
---|
143 | %: %.cc
|
---|
144 | %: %.cpp
|
---|
145 | %: %.f
|
---|
146 | %: %.mod
|
---|
147 | %: %.o
|
---|
148 | %: %.p
|
---|
149 | %: %.r
|
---|
150 | %: %.s
|
---|
151 | %: %.sh
|
---|
152 | %:: %,v
|
---|
153 | %:: RCS/%
|
---|
154 | %:: RCS/%,v
|
---|
155 | %:: SCCS/s.%
|
---|
156 | %:: s.%
|
---|
157 | (%): %
|
---|
158 | endif
|
---|
159 |
|
---|
160 |
|
---|