3 # Hint HOST_CCVER handling.
6 # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
7 # .So used for PIC object files
9 .SUFFIXES
: .out .no .c .
cc .
cpp .
cxx .C .y .l
12 ${NXCC} ${_
${.IMPSRC
}_FLAGS
} ${NXCFLAGS
:N-flto
} -c
${.IMPSRC
} -o
${.TARGET
}
13 @
${NXLD} -o
${.TARGET
}.tmp
-x
-r
${.TARGET
}
14 @mv
${.TARGET
}.tmp
${.TARGET
}
16 .
cc.no .C.no .
cpp.no .
cxx.no
:
17 ${NXCXX} ${_
${.IMPSRC
}_FLAGS
} ${NXCXXFLAGS
:N-flto
} -c
${.IMPSRC
} -o
${.TARGET
}
18 @
${NXLD} -o
${.TARGET
}.tmp
-x
-r
${.TARGET
}
19 @mv
${.TARGET
}.tmp
${.TARGET
}
23 .if defined
(LIB
) && !empty
(LIB
)
25 OBJS
+= ${SRCS
:N
*.h
:N
*.patch
:R
:S
/$/.no
/g
}
26 . for _PATCH in
${SRCS
:T
:N
*.no_obj.patch
:N
*.h.patch
:M
*.patch
}
27 . for _OBJ in
${_PATCH
:R
:R
:S
/$/.no
/}
28 OBJS
:= ${OBJS
:N
${_OBJ}} ${_OBJ}
34 .if defined
(LIB
) && !empty
(LIB
)
37 lib
${LIB}.na
: ${OBJS} ${STATICOBJS}
38 @
${ECHO} building native static
${LIB} library
40 ${NXAR} cq
${.TARGET
} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
41 ${NXRANLIB} ${.TARGET
}
50 .if
!exists
(${.OBJDIR
}/${DEPENDFILE})
51 .if defined
(LIB
) && !empty
(LIB
)
52 ${OBJS} ${STATICOBJS}: ${SRCS
:M
*.h
}
58 .if defined
(CLEANFILES
) && !empty
(CLEANFILES
)
61 .if defined
(LIB
) && !empty
(LIB
)
62 rm -f a.out
${OBJS} ${OBJS
:S
/$/.tmp
/} ${STATICOBJS}
64 .if defined
(_LIBS
) && !empty
(_LIBS
)
67 .if defined
(CLEANDIRS
) && !empty
(CLEANDIRS
)