xref: /freebsd/share/mk/bsd.suffixes.mk (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1
2.sh:
3	cp -f ${.IMPSRC} ${.TARGET}
4	chmod a+x ${.TARGET}
5
6.c:
7	${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
8	${CTFCONVERT_CMD}
9
10.c.o:
11	${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
12	${CTFCONVERT_CMD}
13
14.c.bco:
15	${CC} -emit-llvm ${IR_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
16
17.c.llo:
18	${CC} -emit-llvm ${IR_CFLAGS} -S ${.IMPSRC} -o ${.TARGET}
19
20.cc .cpp .cxx .C:
21	${CXX:N${CCACHE_BIN}} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
22
23.cc.o .cpp.o .cxx.o .C.o:
24	${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
25
26.cc.bco .cpp.bco .cxx.bco .C.bco:
27	${CXX} -emit-llvm ${IR_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
28
29.cc.llo .cpp.llo .cxx.llo .C.llo:
30	${CXX} -emit-llvm ${IR_CXXFLAGS} -S ${.IMPSRC} -o ${.TARGET}
31
32.m.o:
33	${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
34	${CTFCONVERT_CMD}
35
36.p.o:
37	${PC} ${PFLAGS} -c ${.IMPSRC} -o ${.TARGET}
38	${CTFCONVERT_CMD}
39
40.e .r .F .f:
41	${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \
42	    -o ${.TARGET}
43
44.e.o .r.o .F.o .f.o:
45	${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} -o ${.TARGET}
46
47.S.o:
48	${CC:N${CCACHE_BIN}} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
49	${CTFCONVERT_CMD}
50
51.asm.o:
52	${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \
53	    -o ${.TARGET}
54	${CTFCONVERT_CMD}
55
56.s.o:
57	${CC:N${CCACHE_BIN}} -x assembler ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
58	${CTFCONVERT_CMD}
59
60# XXX not -j safe
61.y.o:
62	${YACC} ${YFLAGS} ${.IMPSRC}
63	${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET}
64	rm -f y.tab.c
65	${CTFCONVERT_CMD}
66
67.l.o:
68	${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
69	${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET}
70	rm -f ${.PREFIX}.tmp.c
71	${CTFCONVERT_CMD}
72
73# XXX not -j safe
74.y.c:
75	${YACC} ${YFLAGS} ${.IMPSRC}
76	mv y.tab.c ${.TARGET}
77
78.l.c:
79	${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.TARGET}
80
81.s.out .c.out .o.out:
82	${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
83	${CTFCONVERT_CMD}
84
85.f.out .F.out .r.out .e.out:
86	${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \
87	    ${LDLIBS} -o ${.TARGET}
88	rm -f ${.PREFIX}.o
89	${CTFCONVERT_CMD}
90
91# XXX not -j safe
92.y.out:
93	${YACC} ${YFLAGS} ${.IMPSRC}
94	${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
95	rm -f y.tab.c
96	${CTFCONVERT_CMD}
97
98.l.out:
99	${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
100	${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET}
101	rm -f ${.PREFIX}.tmp.c
102	${CTFCONVERT_CMD}
103