-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
32 lines (24 loc) · 869 Bytes
/
makefile
File metadata and controls
32 lines (24 loc) · 869 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
SRCDIR = src
BINDIR = bin
JAVAC = javac
JFLAGS = -g -d $(BINDIR) -cp $(BINDIR):$(JUNIT)
vpath %.java $(SRCDIR)/gui:$(SRCDIR)/main:$(SRCDIR)/util
vpath %.class $(BINDIR)/gui:$(BINDIR)/main:$(BINDIR)/util
# define general build rule for java sources
.SUFFIXES: .java .class
.java.class:
$(JAVAC) $(JFLAGS) $<
# default rule - will be invoked by make
# Wow, this code seems like a mess, need to compile everything together...
all:
javac $(JFLAGS) $(SRCDIR)/main/Book.java $(SRCDIR)/main/Library.java \
$(SRCDIR)/gui/BookGUI.java $(SRCDIR)/gui/FullBookGUI.java $(SRCDIR)/gui/LibraryGUI.java $(SRCDIR)/gui/HintTextField.java \
$(SRCDIR)/util/FileManager.java $(SRCDIR)/util/Config.java
run: all
java -cp $(BINDIR) gui.LibraryGUI
clean:
@rm -f $(BINDIR)/*.class
@rm -f $(BINDIR)/*/*.class
@rm -rf books
@rm -rf images
@rm -f masterlist.txt deleted.txt