-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
31 lines (23 loc) · 729 Bytes
/
makefile
File metadata and controls
31 lines (23 loc) · 729 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
BUILD_DIR = build
LOG_DIR = logs
.PHONY: all build test run clean rebuild help
all: build
build:
@mkdir -p $(BUILD_DIR)
javac -d $(BUILD_DIR) -sourcepath src src/Main.java
test: build
javac -cp $(BUILD_DIR) -d $(BUILD_DIR) -sourcepath src:test test/http/RequestParserTest.java
java -cp $(BUILD_DIR) http.RequestParserTest
run: build
@rm -rf $(LOG_DIR)/*
java -cp $(BUILD_DIR) Main
clean:
rm -rf $(BUILD_DIR) $(LOG_DIR)/*
rebuild: clean build
help:
@echo "Available targets:"
@echo " build - Compile the Java sources"
@echo " test - Compile and run unit tests"
@echo " run - Run the HTTP server"
@echo " clean - Remove compiled files and logs"
@echo " rebuild - Clean and rebuild the project"