-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (41 loc) · 1.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# $Id: Makefile,v 1.11 2014-07-02 20:01:17-07 - - $
MKFILE = Makefile
DEPFILE = ${MKFILE}.dep
NOINCL = ci clean spotless
NEEDINCL = ${filter ${NOINCL}, ${MAKECMDGOALS}}
GMAKE = ${MAKE} --no-print-directory
COMPILECPP = g++ -g -O0 -Wall -Wextra -std=gnu++11
MAKEDEPCPP = g++ -MM
CPPHEADER = bigint.h scanner.h debug.h util.h iterstack.h
CPPSOURCE = bigint.cpp scanner.cpp debug.cpp util.cpp main.cpp
EXECBIN = ydc
OBJECTS = ${CPPSOURCE:.cpp=.o}
OTHERS = ${MKFILE} README
ALLSOURCES = ${CPPHEADER} ${CPPSOURCE} ${OTHERS}
LISTING = Listing.ps
all : ${EXECBIN}
- checksource ${ALLSOURCES}
${EXECBIN} : ${OBJECTS}
${COMPILECPP} -o $@ ${OBJECTS}
%.o : %.cpp
${COMPILECPP} -c $<
ci : ${ALLSOURCES}
- checksource ${ALLSOURCES}
cid + ${ALLSOURCES}
lis : ${ALLSOURCES}
mkpspdf ${LISTING} ${ALLSOURCES} ${DEPFILE}
clean :
- rm ${OBJECTS} ${DEPFILE} core ${EXECBIN}.errs
spotless : clean
- rm ${EXECBIN} ${LISTING} ${LISTING:.ps=.pdf}
dep : ${CPPSOURCE} ${CPPHEADER}
@ echo "# ${DEPFILE} created `LC_TIME=C date`" >${DEPFILE}
${MAKEDEPCPP} ${CPPSOURCE} >>${DEPFILE}
${DEPFILE} :
@ touch ${DEPFILE}
${GMAKE} dep
again :
${GMAKE} spotless dep ci all lis
ifeq (${NEEDINCL}, )
include ${DEPFILE}
endif