| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: sys.mk,v 1.128 2015/07/06 00:21:51 chs Exp $ | | 1 | # $NetBSD: sys.mk,v 1.129 2016/03/30 17:35:43 martin Exp $ |
2 | # @(#)sys.mk 8.2 (Berkeley) 3/21/94 | | 2 | # @(#)sys.mk 8.2 (Berkeley) 3/21/94 |
3 | # | | 3 | # |
4 | # This file contains the basic rules for make(1) and is read first | | 4 | # This file contains the basic rules for make(1) and is read first |
5 | # Do not put conditionals that are set on different files here and | | 5 | # Do not put conditionals that are set on different files here and |
6 | # expect them to work. | | 6 | # expect them to work. |
7 | | | 7 | |
8 | unix?= We run NetBSD. | | 8 | unix?= We run NetBSD. |
9 | | | 9 | |
10 | .SUFFIXES: .a .o .ln .s .S .c .cc .cpp .cxx .C .f .F .r .p .l .y .sh | | 10 | .SUFFIXES: .a .o .ln .s .S .c .cc .cpp .cxx .C .f .F .r .p .l .y .sh |
11 | | | 11 | |
12 | .LIBS: .a | | 12 | .LIBS: .a |
13 | | | 13 | |
14 | AR?= ar | | 14 | AR?= ar |
| @@ -24,28 +24,26 @@ COMPILE.S?= ${CC} ${AFLAGS} ${AFLAGS.${< | | | @@ -24,28 +24,26 @@ COMPILE.S?= ${CC} ${AFLAGS} ${AFLAGS.${< |
24 | LINK.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${LDFLAGS} | | 24 | LINK.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${LDFLAGS} |
25 | | | 25 | |
26 | CC?= cc | | 26 | CC?= cc |
27 | .if ${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb" | | 27 | .if ${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb" |
28 | # -O2 is too -falign-* zealous for low-memory sh3 machines | | 28 | # -O2 is too -falign-* zealous for low-memory sh3 machines |
29 | DBG?= -Os -freorder-blocks | | 29 | DBG?= -Os -freorder-blocks |
30 | .elif ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m68000" | | 30 | .elif ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m68000" |
31 | # -freorder-blocks (enabled by -O2) produces much bigger code | | 31 | # -freorder-blocks (enabled by -O2) produces much bigger code |
32 | DBG?= -O2 -fno-reorder-blocks | | 32 | DBG?= -O2 -fno-reorder-blocks |
33 | .elif ${MACHINE_ARCH} == "coldfire" | | 33 | .elif ${MACHINE_ARCH} == "coldfire" |
34 | DBG?= -O1 | | 34 | DBG?= -O1 |
35 | .elif !empty(MACHINE_ARCH:Maarch64*) | | 35 | .elif !empty(MACHINE_ARCH:Maarch64*) |
36 | DBG?= -O2 ${"${.TARGET:M*.po}" == "":? -fomit-frame-pointer:} | | 36 | DBG?= -O2 ${"${.TARGET:M*.po}" == "":? -fomit-frame-pointer:} |
37 | .elif ${MACHINE_ARCH} == "vax" | | | |
38 | DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload | | | |
39 | .else | | 37 | .else |
40 | DBG?= -O2 | | 38 | DBG?= -O2 |
41 | .endif | | 39 | .endif |
42 | CFLAGS?= ${DBG} | | 40 | CFLAGS?= ${DBG} |
43 | LDFLAGS?= | | 41 | LDFLAGS?= |
44 | COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c | | 42 | COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c |
45 | LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} | | 43 | LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} |
46 | | | 44 | |
47 | # C Type Format data is required for DTrace | | 45 | # C Type Format data is required for DTrace |
48 | CTFFLAGS ?= -g -L VERSION | | 46 | CTFFLAGS ?= -g -L VERSION |
49 | CTFMFLAGS ?= -t -g -L VERSION | | 47 | CTFMFLAGS ?= -t -g -L VERSION |
50 | | | 48 | |
51 | CXX?= c++ | | 49 | CXX?= c++ |