-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 667 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 667 Bytes
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
# Author: Ian Gudger, [email protected]
# Adapted from Makefile used in CMPS 12B taught by Wesley Mackey
MKFILE = Makefile
NOINCLUDE = ci clean spotless
NEEDINCL = ${filter ${NOINCLUDE}, ${MAKECMDGOALS}}
GMAKE = gmake --no-print-directory
LEX = flex
COMPILER = cc
CSOURCE = shell.c ${LCSOURCE}
LSOURCE = lex.c
LCSOURCE = ${LSOURCE:.c=.yy.c}
CHEADER =
OBJECTS = ${CSOURCE:.c=.o}
EXECBIN = shell
all : ${EXECBIN}
${EXECBIN} : ${OBJECTS}
${COMPILER} -o $@ ${OBJECTS}
%.o : %.c
${COMPILER} -c $<
${LCSOURCE} :
flex ${LSOURCE}
clean :
- rm ${OBJECTS} ${LCSOURCE}
spotless : clean
- rm ${EXECBIN}
again :
${GMAKE} spotless ci all