Deleted Added
sdiff udiff text old ( 95064 ) new ( 95306 )
full compact
1# from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
2# $FreeBSD: head/share/mk/bsd.prog.mk 95306 2002-04-23 09:03:56Z ru $
3
4.include <bsd.init.mk>
5
6.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .s .S .asm
7
8CFLAGS+=${COPTS} ${DEBUG_FLAGS}
9
10.if !defined(DEBUG_FLAGS)

--- 61 unchanged lines hidden (view full) ---

72MAN1= ${MAN}
73.endif
74.endif
75
76all: objwarn ${PROG} ${SCRIPTS} ${FILES}
77.if !defined(NOMAN)
78all: all-man
79.endif
80
81CLEANFILES+= ${PROG} ${OBJS}
82
83.if defined(PROG)
84_EXTRADEPEND:
85.if ${OBJFORMAT} == aout
86 echo ${PROG}: `${CC} -Wl,-f ${CFLAGS} ${LDFLAGS} \
87 ${LDADD:S/^/-Wl,/}` >> ${DEPENDFILE}

--- 11 unchanged lines hidden (view full) ---

99.endif
100
101_INSTALLFLAGS:= ${INSTALLFLAGS}
102.for ie in ${INSTALLFLAGS_EDIT}
103_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
104.endfor
105
106realinstall: beforeinstall
107realinstall: _proginstall
108_proginstall:
109.if defined(PROG)
110.if defined(PROGNAME)
111 ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
112 ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
113.else
114 ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
115 ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
116.endif
117.endif
118.if defined(HIDEGAME)
119 (cd ${DESTDIR}${ORIGBINDIR}; ln -fs dm ${PROG}; \
120 chown -h ${BINOWN}:${ORIGBINGRP} ${PROG})
121.endif
122
123realinstall:
124.if defined(LINKS) && !empty(LINKS)
125 @set ${LINKS}; \
126 while test $$# -ge 2; do \
127 l=${DESTDIR}$$1; \
128 shift; \
129 t=${DESTDIR}$$1; \
130 shift; \
131 ${ECHO} $$t -\> $$l; \

--- 61 unchanged lines hidden (view full) ---

193_FILESINS_${file:T}: ${file}
194 ${INSTALL} ${COPY} -o ${FILESOWN_${.ALLSRC:T}} \
195 -g ${FILESGRP_${.ALLSRC:T}} -m ${FILESMODE_${.ALLSRC:T}} \
196 ${.ALLSRC} \
197 ${DESTDIR}${FILESDIR_${.ALLSRC:T}}/${FILESNAME_${.ALLSRC:T}}
198.endfor
199.endif
200
201install: afterinstall
202afterinstall: realinstall
203.if !defined(NOMAN)
204afterinstall: maninstall
205.endif
206.endif
207
208DISTRIBUTION?= bin
209.if !target(distribute)
210distribute:
211.for dist in ${DISTRIBUTION}
212 cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${dist} SHARED=copies
213.endfor
214.endif
215
216.if !target(lint)
217lint: ${SRCS}
218.if defined(PROG)
219 ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} | more 2>&1
220.endif
221.endif
222
223.if defined(NOTAGS)
224tags:
225.endif
226
227.if !target(tags)
228tags: ${SRCS}
229.if defined(PROG)
230 @cd ${.CURDIR} && gtags ${GTAGSFLAGS} ${.OBJDIR}
231.if defined(HTML)
232 @cd ${.CURDIR} && htags ${HTAGSFLAGS} -d ${.OBJDIR} ${.OBJDIR}
233.endif
234.endif
235.endif
236
237.if !defined(NOMAN)
238.include <bsd.man.mk>
239.endif
240
241.if ${OBJFORMAT} != aout || make(checkdpadd) || defined(NEED_LIBNAMES)
242.include <bsd.libnames.mk>
243.endif
244
245.include <bsd.dep.mk>
246
247.if defined(PROG) && !exists(${.OBJDIR}/${DEPENDFILE})
248${OBJS}: ${SRCS:M*.h}
249.endif
250
251.include <bsd.obj.mk>
252
253.include <bsd.sys.mk>