4 CXX_SUFFIXES
+= .
cc .
cpp .
cxx .C
5 CXX_SUFFIXES
:= ${CXX_SUFFIXES
:O
:u
}
6 .SUFFIXES
: .out .a .o .s .S .c
${CXX_SUFFIXES} .F .f .r .y .l .cl .p .h .sh .m4
10 # some options we need to know early
11 OPTIONS_DEFAULT_NO
+= \
15 OPTIONS_DEFAULT_DEPENDENT
+= \
16 AUTO_OBJ
/DIRDEPS_BUILD \
17 META_MODE
/DIRDEPS_BUILD \
18 STAGING
/DIRDEPS_BUILD \
20 # if you want objdirs make them automatic
21 # and do it early before we compute .PATH
22 .if
${MK_AUTO_OBJ
:Uno
} == "yes" ||
${MKOBJDIRS
:Uno
} == "auto"
23 .
include <auto.obj.mk
>
27 # MANTARGET=man causes MANDIR to contain share/man/man with mk-20160802
28 MANDIR?
= /usr
/share
/man
44 COMPILE.s?
= ${CC} ${AFLAGS} -c
45 LINK.s?
= ${CC} ${AFLAGS} ${LDFLAGS}
46 COMPILE.S?
= ${CC} ${AFLAGS} ${CPPFLAGS} -c
47 LINK.S?
= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
49 CC?
= /usr
/gcc
/4.9/bin
/gcc
50 CPP?
= /usr
/gcc
/4.9/bin
/cpp
51 CFLAGS?
= -O2
${PIPE} ${DBG}
52 COMPILE.c?
= ${CC} ${CFLAGS} ${CPPFLAGS} -c
53 LINK.c?
= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
55 CXX?
= /usr
/gcc
/4.9/bin
/g
++
57 COMPILE.
cc?
= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
58 LINK.
cc?
= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
60 FC?
= /usr
/gcc
/4.9/bin
/gfortran
63 COMPILE.f?
= ${FC} ${FFLAGS} -c
64 LINK.f?
= ${FC} ${FFLAGS} ${LDFLAGS}
65 COMPILE.F?
= ${FC} ${FFLAGS} ${CPPFLAGS} -c
66 LINK.F?
= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
67 COMPILE.r?
= ${FC} ${FFLAGS} ${RFLAGS} -c
68 LINK.r?
= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
72 LEX.l?
= ${LEX} ${LFLAGS}
85 COMPILE.p?
= ${PC} ${PFLAGS} ${CPPFLAGS} -c
86 LINK.p?
= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
94 YACC.y?
= ${YACC} ${YFLAGS}
98 ${LINK.c
} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
100 ${COMPILE.c
} ${.IMPSRC
}
102 ${COMPILE.c
} ${.IMPSRC
}
103 ${AR} ${ARFLAGS} $@
$*.o
108 ${LINK.
cc} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
109 ${CXX_SUFFIXES
:%=%.o
}:
110 ${COMPILE.
cc} ${.IMPSRC
}
111 ${CXX_SUFFIXES
:%=%.a
}:
112 ${COMPILE.
cc} ${.IMPSRC
}
113 ${AR} ${ARFLAGS} $@
$*.o
118 ${LINK.f
} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
120 ${COMPILE.f
} ${.IMPSRC
}
122 ${COMPILE.f
} ${.IMPSRC
}
123 ${AR} ${ARFLAGS} $@
$*.o
127 ${LINK.F
} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
129 ${COMPILE.F
} ${.IMPSRC
}
131 ${COMPILE.F
} ${.IMPSRC
}
132 ${AR} ${ARFLAGS} $@
$*.o
136 ${LINK.r
} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
138 ${COMPILE.r
} ${.IMPSRC
}
140 ${COMPILE.r
} ${.IMPSRC
}
141 ${AR} ${ARFLAGS} $@
$*.o
146 ${LINK.p
} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
148 ${COMPILE.p
} ${.IMPSRC
}
150 ${COMPILE.p
} ${.IMPSRC
}
151 ${AR} ${ARFLAGS} $@
$*.o
156 ${LINK.s
} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
158 ${COMPILE.s
} ${.IMPSRC
}
160 ${COMPILE.s
} ${.IMPSRC
}
161 ${AR} ${ARFLAGS} $@
$*.o
164 ${LINK.S
} -o
${.TARGET
} ${.IMPSRC
} ${LDLIBS}
166 ${COMPILE.S
} ${.IMPSRC
}
168 ${COMPILE.S
} ${.IMPSRC
}
169 ${AR} ${ARFLAGS} $@
$*.o
175 ${LINK.c
} -o
${.TARGET
} lex.yy.c
${LDLIBS} -ll
179 mv
lex.yy.c
${.TARGET
}
182 ${COMPILE.c
} -o
${.TARGET
} lex.yy.c
188 ${LINK.c
} -o
${.TARGET
} y.tab.c
${LDLIBS}
192 mv y.tab.c
${.TARGET
}
195 ${COMPILE.c
} -o
${.TARGET
} y.tab.c
201 cp
${.IMPSRC
} ${.TARGET
}