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