3 ################ Source files ########################################
5 SRCS
= $(wildcard *.
cc)
8 ################ Compilation #########################################
10 .PHONY
: all install uninstall
11 .PHONY
: clean depend html
check dist distclean maintainer-clean
16 @echo
"Linking $@ ..."
17 @
${LD} ${LDFLAGS} -o
$@
$^
${LIBS}
20 @echo
" Compiling $< ..."
21 @
${CXX} ${CXXFLAGS} -o
$@
-c
$<
24 @echo
" Compiling $< to assembly ..."
25 @
${CXX} ${CXXFLAGS} -S
-g0
-Os
-DNDEBUG
=1 -fomit-frame-pointer
-o
$@
-c
$<
29 ################ Installation ########################################
31 INSTALLDIR
= ${INSTALL} -d
32 INSTALLBIN
= ${INSTALL} -s
-p
-m
755
35 @echo
"Installing ${EXE} to ${BINDIR} ..."
36 @
${INSTALLDIR} ${BINDIR}
37 @
${INSTALLBIN} ${EXE} ${BINDIR}
40 @echo
"Removing ${EXE} from ${BINDIR} ..."
41 @
rm -f
${BINDIR}/${EXE}
43 ################ Maintenance ###########################################
46 @echo
"Removing generated files ..."
47 @
rm -f
${EXE} ${OBJS} ${TOCLEAN}
51 @for i in
${SRCS}; do \
52 ${CXX} ${CXXFLAGS} -M
-MT
$${i
%%.
cc}.o
$$i >> .depend
; \
56 DISTDIR
= ${HOME}/stored
57 DISTNAM
= ${EXE}-${MAJOR}.
${MINOR}
58 DISTTAR
= ${DISTNAM}.
${BUILD}.
tar.bz2
61 mkdir
${TMPDIR}/${DISTNAM}
62 cp
-r .
${TMPDIR}/${DISTNAM}
63 +make
-C
${TMPDIR}/${DISTNAM} html
distclean
64 (cd
${TMPDIR}/${DISTNAM}; rm -rf
`find . -name .svn`)
65 (cd
${TMPDIR}; tar jcf
${DISTDIR}/${DISTTAR} ${DISTNAM}; rm -rf
${DISTNAM})
68 @
rm -f Config.mk config.h bsconf.o bsconf .depend
70 maintainer-clean
: distclean