summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4953758
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+# Makefile for BookCatalog
+
+NAME = BookCatalog
+ECHO = @echo
+SRC_DIR = src
+LIB_DIR = lib
+BIN_DIR = bin
+
+all: $(NAME)
+
+$(NAME): $(BIN_DIR)
+ $(ECHO) "Building $@"
+ @javac -cp "./lib/*" src/com/joshwalters/bookcatalog/*.java -sourcepath src/com/joshwalters/bookcatalog/ src/com/joshwalters/bookcatalog/bookdatabase/*.java src/com/joshwalters/bookcatalog/table/*.java src/com/joshwalters/bookcatalog/sound/*.java src/com/joshwalters/bookcatalog/isbnlookup/*.java -d ./bin
+ $(ECHO) "Built $(NAME)"
+
+$(BIN_DIR):
+ $(ECHO) "Folder '$(BIN_DIR)' does not exist, creating."
+ @mkdir $(BIN_DIR)
+
+clean:
+ @rm -rf bin/*
+ $(ECHO) "Project has been cleaned"
+
+new:
+ make clean
+ make