-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
32 lines (25 loc) · 834 Bytes
/
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
##################################################################################
# This file is under MIT License #
# https://mit-license.org/ #
# #
# Copyright (c) 2024 Totema #
# https://github.com/TotemaM #
##################################################################################
SRC_DIR := src
BLD_DIR := build
OUT_DIR := out
TST_DIR := test
SRC_FILES = $(shell find $(SRC_DIR) -type f -name '*.java')
SRC_FILES += $(shell find $(TST_DIR) -type f -name '*.java')
compile:
@ javac -d $(OUT_DIR) $(SRC_FILES)
run: compile
@ java -cp $(OUT_DIR) Main $(filter-out $@,$(MAKECMDGOALS))
test: compile
@ java -cp $(OUT_DIR) test.Main $(filter-out $@,$(MAKECMDGOALS))
# Ignore undifined targets
%:
@:
.PHONY: clear
clear:
@ rm -rf $(OUT_DIR)