-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
66 lines (58 loc) · 1.71 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
56
57
58
59
60
61
62
63
64
65
66
JFLAGS = -g
JRUNNER = java
MAIN = SQL
JC = javac
VERSION = 4
.SUFFIXES: .java .class
.java.class:
$(JC) $(JFLAGS) $*.java
CLASSES = \
Console.java\
WriteFile.java\
ReadFile.java\
Tokenizer.java\
Token.java\
SQLEngine.java\
Table.java\
Lock.java
default: classes
classes: $(CLASSES:.java=.class)
clear
@echo "✓ SQL Compiled - Runtime Dependencies Now Available [$(MAIN)]"
@echo "✓ SQL Executed - SQL Simulator will Initialize [v$(VERSION)]"
@($(JC) $(MAIN).java)
@($(JRUNNER) $(MAIN) $(FILE))
norun: $(CLASSES:.java=.class)
clear
@echo "✓ SQL Compiled - Runtime Dependencies Now Available [$(MAIN)]"
@echo ""
clean:
$(RM) *.class
$(RM) *.lgf
$(RM) *.zip
$(RM) .DS_Store
clear
@echo "✓ SQL Cleaned - Runtime Dependencies No Longer Available"
@echo ""
cleandb:
rm -r ~/cs457/
clear
@echo "✓ SQL DB Cleaned - \"cs457\" Removed from Home Folder"
@echo ""
export:
@(zip -r "serdelyi_pa$(VERSION).zip" . -x ".git/*" "*.class" "*.lgf" "*.zip")
clear
@echo "✓ SQL Exported - ZIP File Now Available [serdelyi_pa$(VERSION).zip]"
@echo ""
commands:
clear
@echo "///////////////////////////////////////////////////////////////"
@echo "// MAKEFILE COMMANDS //"
@echo "///////////////////////////////////////////////////////////////"
@echo "make makes the executable and runs the program"
@echo "make FILE=PATH uses an input file instead of command line"
@echo "make norun makes the executable w/o running the program"
@echo "make clean removes the executable and unnecessary files"
@echo "make cleandb removes only the db files in the home folder"
@echo "make export makes a packaged .zip for submission"
@echo ""