1 /* Data base of default implicit rules for GNU Make.
2 Copyright (C) 1988-2016 Free Software Foundation, Inc.
3 This file is part of GNU Make.
5 GNU Make is free software; you can redistribute it and/or modify it under the
6 terms of the GNU General Public License as published by the Free Software
7 Foundation; either version 3 of the License, or (at your option) any later
10 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License along with
15 this program. If not, see <http://www.gnu.org/licenses/>. */
28 /* Define GCC_IS_NATIVE if gcc is the native development environment on
29 your system (gcc/bison/flex vs cc/yacc/lex). */
30 #if defined(__MSDOS__) || defined(__EMX__)
31 # define GCC_IS_NATIVE
35 /* This is the default list of suffixes for suffix rules.
36 '.s' must come last, so that a '.o' file will be made from
37 a '.c' or '.p' or ... file rather than from a .s file. */
39 static char default_suffixes
[]
40 #ifndef CONFIG_NO_DEFAULT_SUFFIXES
42 /* VMS should include all UNIX/POSIX + some VMS extensions */
43 = ".out .exe .a .olb .hlb .tlb .mlb .ln .o .obj .c .cxx .cc .cpp .pas .p \
44 .for .f .r .y .l .ym .yl .mar .s .ss .i .ii .mod .sym .def .h .info .dvi \
45 .tex .texinfo .texi .txinfo .mem .hlp .brn .rnh .rno .rnt .rnx .w .ch .cweb \
46 .web .com .sh .elc .el";
47 #elif defined(__EMX__)
48 = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
49 .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
50 .w .ch .web .sh .elc .el .obj .exe .dll .lib";
52 = ".out .a .ln .o .c .cc .C .cpp .p .f .F .m .r .y .l .ym .yl .s .S \
53 .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
54 .w .ch .web .sh .elc .el";
56 #else /* CONFIG_NO_DEFAULT_SUFFIXES */
58 #endif /* CONFIG_NO_DEFAULT_SUFFIXES */
60 static struct pspec default_pattern_rules
[] =
62 #ifndef CONFIG_NO_DEFAULT_PATTERN_RULES
65 "@if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/"
67 "$(patsubst %,TEXT,$(filter %.tlb %.TLB,$@)),"
68 "$(patsubst %,HELP,$(filter %.hlb %.HLB,$@)),"
69 "$(patsubst %,MACRO,$(filter %.mlb %.MLB,$@)),"
71 "$(patsubst %,SHARE,$(filter %.olb %.OLB,$@)),"
72 "$(patsubst %,SHARE,$(filter %.exe %.EXE,$<))),"
75 "$(AR) $(ARFLAGS) $@ $<" },
79 "$(AR) $(ARFLAGS) $@ $<" },
81 /* The X.out rules are only in BSD's default set because
82 BSD Make has no null-suffix rules, so 'foo.out' and
83 'foo' are the same thing. */
90 "@rm -f $@ \n cp $< $@" },
92 /* Syntax is "ctangle foo.w foo.ch foo.c". */
95 { "%.tex", "%.w %.ch",
97 #endif /* !CONFIG_NO_DEFAULT_PATTERN_RULES */
101 static struct pspec default_terminal_rules
[] =
103 #ifndef CONFIG_NO_DEFAULT_TERMINAL_RULES
107 { "%", "%$$5lv", /* Multinet style */
108 "if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
109 { "%", "[.$$rcs]%$$5lv", /* Multinet style */
110 "if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
111 { "%", "%_v", /* Normal style */
112 "if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
113 { "%", "[.rcs]%_v", /* Normal style */
114 "if f$$search(\"$@\") .nes. \"\" then +$(CHECKOUT,v)" },
117 /* ain't no SCCS on vms */
130 "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
132 "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" },
134 #endif /* !CONFIG_NO_DEFAULT_TERMINAL_RULES */
138 static const char *default_suffix_rules
[] =
140 #ifndef CONFIG_NO_DEFAULT_SUFFIX_RULES
143 "$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
145 "$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) -o $@",
147 "$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
149 "$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
151 "$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
153 "$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
155 "$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
157 "$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
159 "$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
161 "$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
163 "$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
165 "$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
167 "$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
169 "$(COMPILE.mod) -o $@ -e $@ $^",
172 "$(COMPILE.def) -o $@ $<",
178 "$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
180 "$(COMPILE.mar) $^ \n $(LINK.obj) $(subst .mar,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
182 "$(COMPILE.s) -o $@ $<",
184 "$(COMPILE.s) $^ \n $(LINK.obj) $(subst .s,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
186 "$(COMPILE.c) $^ \n $(LINK.obj) $(subst .c,.obj,$^) $(LOADLIBES) $(LDLIBS) $(CRT0) /exe=$@",
189 "$(COMPILE.cc) $^ \n $(LINK.obj) $(CXXSTARTUP),sys$$disk:[]$(subst .cc,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
191 "$(COMPILE.cc) $^ \n $(CXXLINK.obj) $(subst .cc,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
193 "$(COMPILE.cxx) $^ \n $(CXXLINK.obj) $(subst .cxx,.obj,$^) $(LOADLIBES) $(LXLIBS) $(LDLIBS) $(CXXRT0) /exe=$@",
196 "$(COMPILE.for) $^ \n $(LINK.obj) $(subst .for,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
198 "$(COMPILE.pas) $^ \n $(LINK.obj) $(subst .pas,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@",
204 "$(COMPILE.mar) /obj=$@ $<",
206 "$(COMPILE.s) /obj=$@ $<",
208 "$(COMPILE.s) /obj=$@ $<",
210 "$(COMPILE.c)/prep /list=$@ $<",
212 "$(COMPILE.c)/noobj/machine /list=$@ $<",
214 "$(COMPILE.c)/noprep/noobj/machine /list=$@ $<",
216 "$(COMPILE.c) /obj=$@ $<",
218 "$(COMPILE.c) /obj=$@ $<",
220 "$(COMPILE.cc)/prep /list=$@ $<",
222 "$(COMPILE.cc)/noobj/machine /list=$@ $<",
224 "$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
226 "$(COMPILE.cc) /obj=$@ $<",
228 "$(COMPILE.cc) /obj=$@ $<",
230 "$(COMPILE.cxx) /obj=$@ $<",
232 "$(COMPILE.cxx) /obj=$@ $<",
234 "$(COMPILE.for) /obj=$@ $<",
236 "$(COMPILE.for) /obj=$@ $<",
238 "$(COMPILE.pas) /obj=$@ $<",
240 "$(COMPILE.pas) /obj=$@ $<",
243 "$(YACC.y) $< \n rename y_tab.c $@",
245 "$(LEX.l) $< \n rename lexyy.c $@",
254 "$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
256 "$(COMPILE.f) $(OUTPUT_OPTION) $<",
258 "$(COMPILE.m) $(OUTPUT_OPTION) $<",
260 "$(COMPILE.p) $(OUTPUT_OPTION) $<",
262 "$(COMPILE.r) $(OUTPUT_OPTION) $<",
264 "$(COMPILE.mod) -o $@ $<",
269 "$(YACC.y) $< \n rename y_tab.c $@",
272 "@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
277 "$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@",
279 "$(LINK.s) $^ $(LOADLIBES) $(LDLIBS) -o $@",
281 "$(LINK.S) $^ $(LOADLIBES) $(LDLIBS) -o $@",
283 "$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@",
285 "$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@",
287 "$(LINK.C) $^ $(LOADLIBES) $(LDLIBS) -o $@",
289 "$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@",
291 "$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@",
293 "$(LINK.m) $^ $(LOADLIBES) $(LDLIBS) -o $@",
295 "$(LINK.p) $^ $(LOADLIBES) $(LDLIBS) -o $@",
297 "$(LINK.F) $^ $(LOADLIBES) $(LDLIBS) -o $@",
299 "$(LINK.r) $^ $(LOADLIBES) $(LDLIBS) -o $@",
301 "$(COMPILE.mod) -o $@ -e $@ $^",
304 "$(COMPILE.def) -o $@ $<",
307 "cat $< >$@ \n chmod a+x $@",
310 "$(COMPILE.s) -o $@ $<",
312 "$(COMPILE.S) -o $@ $<",
314 "$(COMPILE.c) $(OUTPUT_OPTION) $<",
316 "$(COMPILE.cc) $(OUTPUT_OPTION) $<",
318 "$(COMPILE.C) $(OUTPUT_OPTION) $<",
320 "$(COMPILE.cpp) $(OUTPUT_OPTION) $<",
322 "$(COMPILE.f) $(OUTPUT_OPTION) $<",
324 "$(COMPILE.m) $(OUTPUT_OPTION) $<",
326 "$(COMPILE.p) $(OUTPUT_OPTION) $<",
328 "$(COMPILE.F) $(OUTPUT_OPTION) $<",
330 "$(COMPILE.r) $(OUTPUT_OPTION) $<",
332 "$(COMPILE.mod) -o $@ $<",
338 "$(YACC.y) $< \n $(LINT.c) -C$* y.tab.c \n $(RM) y.tab.c",
340 "$(YACC.y) $< \n $(LINT.c) -C$* y_tab.c \n $(RM) y_tab.c",
343 "@$(RM) $*.c\n $(LEX.l) $< > $*.c\n$(LINT.c) -i $*.c -o $@\n $(RM) $*.c",
347 "$(YACC.y) $< \n mv -f y.tab.c $@",
349 "$(YACC.y) $< \n mv -f y_tab.c $@",
352 "@$(RM) $@ \n $(LEX.l) $< > $@",
354 "$(YACC.m) $< \n mv -f y.tab.c $@",
356 "@$(RM) $@ \n $(LEX.m) $< > $@",
359 "$(PREPROCESS.F) $(OUTPUT_OPTION) $<",
361 "$(PREPROCESS.r) $(OUTPUT_OPTION) $<",
363 /* This might actually make lex.yy.c if there's no %R% directive in $*.l,
364 but in that case why were you trying to make $*.r anyway? */
366 "$(LEX.l) $< > $@ \n mv -f lex.yy.r $@",
369 "$(PREPROCESS.S) $< > $@",
372 "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
375 "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
378 "$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@",
384 "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
387 "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
390 "$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<",
393 "$(CTANGLE) $< - $@", /* The '-' says there is no '.ch' file. */
399 "$(CWEAVE) $< - $@", /* The '-' says there is no '.ch' file. */
405 #endif /* !CONFIG_NO_DEFAULT_SUFFIX_RULES */
409 static const char *default_variables
[] =
411 #ifndef CONFIG_NO_DEFAULT_VARIABLES
423 "LIBRARY", "library",
424 "ARFLAGS", "/replace",
433 "ECHO", "builtin_echo",
442 "CXXLINK", "cxxlink",
444 /* CXXLINK is not used on VMS/IA64 */
450 "CPP", "$(CC) /preprocess_only",
452 /* System V uses these, so explicit rules using them should work.
453 However, there is no way to make implicit rules use them and FC. */
455 "F77FLAGS", "$(FFLAGS)",
459 "YACC", "bison/yacc",
460 "YFLAGS", "/Define/Verbose",
462 "MAKEINFO", "makeinfo",
464 "TEXINDEX", "texindex",
466 "RM", "delete/nolog",
470 "CRT0", ",sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crt0.obj",
471 "CXXSTARTUP", "gnu_cc_library:crtbegin.obj",
472 "CXXRT0", ",sys$$library:vaxcrtl.olb/lib,gnu_cc_library:crtend.obj,gnu_cc_library:gxx_main.obj",
473 "LXLIBS", ",gnu_cc_library:libstdcxx.olb/lib,gnu_cc_library:libgccplus.olb/lib",
474 "LDLIBS", ",gnu_cc_library:libgcc.olb/lib",
483 "LINK.o", "$(LD) $(LDFLAGS)",
484 "LINK.obj", "$(LD) $(LDFLAGS)",
485 #ifndef GCC_IS_NATIVE
486 "CXXLINK.obj", "$(CXXLD) $(LDFLAGS)",
487 "COMPILE.cxx", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
489 "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
490 "LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
491 "COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
492 "LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
493 "COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
494 "COMPILE.C", "$(COMPILE.cc)",
495 "COMPILE.cpp", "$(COMPILE.cc)",
496 "LINK.C", "$(LINK.cc)",
497 "LINK.cpp", "$(LINK.cc)",
498 "YACC.y", "$(YACC) $(YFLAGS)",
499 "LEX.l", "$(LEX) $(LFLAGS)",
500 "YACC.m", "$(YACC) $(YFLAGS)",
501 "LEX.m", "$(LEX) $(LFLAGS) -t",
502 "COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)",
503 "COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
504 "LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
505 "COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
506 "LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
507 "COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
508 "LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
509 "COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
510 "COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
511 "COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
512 "COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
513 "LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
514 "COMPILE.mar", "$(MACRO) $(MACROFLAGS)",
515 "COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
516 "LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
517 "COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
518 "PREPROCESS.S", "$(CC) -E $(CPPFLAGS)",
519 "PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
520 "PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
521 "LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
523 "MV", "rename/new_version",
525 ".LIBPATTERNS", "%.olb lib%.a",
535 "CXX", "gpp", /* g++ is an invalid name on MSDOS */
538 # endif /* __MSDOS__ */
546 /* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
547 and to the empty string if $@ does exist. */
548 "CHECKOUT,v", "+$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@)",
555 "CF77PP", "/lib/cpp",
559 #else /* Not CRAY. */
567 #endif /* __convex__ */
569 /* System V uses these, so explicit rules using them should work.
570 However, there is no way to make implicit rules use them and FC. */
572 "F77FLAGS", "$(FFLAGS)",
596 "YACC", "yacc", /* Or "bison -y" */
598 "MAKEINFO", "makeinfo",
600 "TEXI2DVI", "texi2dvi",
604 "CTANGLE", "ctangle",
608 "LINK.o", "$(CC) $(LDFLAGS) $(TARGET_ARCH)",
609 "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
610 "LINK.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
611 "COMPILE.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
612 "LINK.m", "$(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
613 "COMPILE.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
614 #ifndef HAVE_CASE_INSENSITIVE_FS
615 /* On case-insensitive filesystems, treat *.C files as *.c files,
616 to avoid erroneously compiling C sources as C++, which will
618 "COMPILE.C", "$(COMPILE.cc)",
620 "COMPILE.C", "$(COMPILE.c)",
622 "COMPILE.cpp", "$(COMPILE.cc)",
623 "LINK.cc", "$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
624 #ifndef HAVE_CASE_INSENSITIVE_FS
625 "LINK.C", "$(LINK.cc)",
627 "LINK.C", "$(LINK.c)",
629 "LINK.cpp", "$(LINK.cc)",
630 "YACC.y", "$(YACC) $(YFLAGS)",
631 "LEX.l", "$(LEX) $(LFLAGS) -t",
632 "YACC.m", "$(YACC) $(YFLAGS)",
633 "LEX.m", "$(LEX) $(LFLAGS) -t",
634 "COMPILE.f", "$(FC) $(FFLAGS) $(TARGET_ARCH) -c",
635 "LINK.f", "$(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
636 "COMPILE.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
637 "LINK.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
638 "COMPILE.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c",
639 "LINK.r", "$(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
640 "COMPILE.def", "$(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)",
641 "COMPILE.mod", "$(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)",
642 "COMPILE.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c",
643 "LINK.p", "$(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)",
644 "LINK.s", "$(CC) $(ASFLAGS) $(LDFLAGS) $(TARGET_MACH)",
645 "COMPILE.s", "$(AS) $(ASFLAGS) $(TARGET_MACH)",
646 "LINK.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)",
647 "COMPILE.S", "$(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c",
648 "PREPROCESS.S", "$(CC) -E $(CPPFLAGS)",
649 "PREPROCESS.F", "$(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F",
650 "PREPROCESS.r", "$(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F",
651 "LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)",
653 #ifndef NO_MINUS_C_MINUS_O
654 "OUTPUT_OPTION", "-o $@",
657 #ifdef SCCS_GET_MINUS_G
658 "SCCS_OUTPUT_OPTION", "-G$@",
662 ".LIBPATTERNS", "%.lib",
663 #elif defined(__MSDOS__)
664 ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
665 #elif defined(__APPLE__)
666 ".LIBPATTERNS", "lib%.dylib lib%.a",
667 #elif defined(__CYGWIN__) || defined(WINDOWS32)
668 ".LIBPATTERNS", "lib%.dll.a %.dll.a lib%.a %.lib lib%.dll %.dll",
670 ".LIBPATTERNS", "lib%.so lib%.a",
674 #endif /* !CONFIG_NO_DEFAULT_VARIABLES */
675 /* Make this assignment to avoid undefined variable warnings. */
680 /* Set up the default .SUFFIXES list. */
683 set_default_suffixes (void)
685 suffix_file
= enter_file (strcache_add (".SUFFIXES"));
686 suffix_file
->builtin
= 1;
688 if (no_builtin_rules_flag
)
689 define_variable_cname ("SUFFIXES", "", o_default
, 0);
693 const char *p
= default_suffixes
;
694 suffix_file
->deps
= enter_prereqs (PARSE_SIMPLE_SEQ ((char **)&p
, struct dep
),
696 for (d
= suffix_file
->deps
; d
; d
= d
->next
)
697 d
->file
->builtin
= 1;
699 define_variable_cname ("SUFFIXES", default_suffixes
, o_default
, 0);
703 /* Enter the default suffix rules as file rules. This used to be done in
704 install_default_implicit_rules, but that loses because we want the
705 suffix rules installed before reading makefiles, and the pattern rules
709 install_default_suffix_rules (void)
713 if (no_builtin_rules_flag
)
716 for (s
= default_suffix_rules
; *s
!= 0; s
+= 2)
718 struct file
*f
= enter_file (strcache_add (s
[0]));
719 /* This function should run before any makefile is parsed. */
720 assert (f
->cmds
== 0);
721 #ifndef CONFIG_WITH_ALLOC_CACHES
722 f
->cmds
= xmalloc (sizeof (struct commands
));
724 f
->cmds
= alloccache_alloc (&commands_cache
);
726 f
->cmds
->fileinfo
.filenm
= 0;
727 f
->cmds
->commands
= xstrdup (s
[1]);
728 f
->cmds
->command_lines
= 0;
729 f
->cmds
->recipe_prefix
= RECIPEPREFIX_DEFAULT
;
730 #ifdef CONFIG_WITH_MEMORY_OPTIMIZATIONS
731 f
->cmds
->refs
= 1000;
738 /* Install the default pattern rules. */
741 install_default_implicit_rules (void)
745 if (no_builtin_rules_flag
)
748 for (p
= default_pattern_rules
; p
->target
!= 0; ++p
)
749 install_pattern_rule (p
, 0);
751 for (p
= default_terminal_rules
; p
->target
!= 0; ++p
)
752 install_pattern_rule (p
, 1);
756 define_default_variables (void)
760 if (no_builtin_variables_flag
)
763 for (s
= default_variables
; *s
!= 0; s
+= 2)
764 define_variable (s
[0], strlen (s
[0]), s
[1], o_default
, 1);
768 undefine_default_variables (void)
772 for (s
= default_variables
; *s
!= 0; s
+= 2)
773 undefine_variable_global (s
[0], strlen (s
[0]), o_default
);