-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (59 loc) · 1.86 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
67
68
69
70
71
72
73
74
# Makefile for JavaFX application
# Define variables
# Determine the operating system
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
JAVAC = javac
JAVA = java -XstartOnFirstThread
LIBARYS = .:./lib/*
else ifeq ($(UNAME),Linux)
JAVAC = javac
JAVA = java
LIBARYS = .:./lib/*
else ifeq ($(OS),Windows_NT)
JAVAC = javac
JAVA = java
LIBARYS = .:./lib/*
else
$(error Unsupported operating system: $(UNAME))
endif
# Determine the operating system
BINDIR := bin
JAVA_FILES := $(shell find ./src/main/java/ -name "*.java")
# Rule to create .class files from .java files
all:
$(JAVAC) -cp $(BINDIR):$(LIBARYS) -d bin $(JAVA_FILES)
# Rule to run the application
run:
$(JAVA) -cp $(BINDIR):$(LIBARYS) game.App
docs:
# javadoc -d doc/javadoc -sourcepath src/main/java -classpath "lib/*" src/main/java/game/**/*.java
# Test with UML:
javadoc -d doc/javadoc -sourcepath src/main/java -classpath "./lib/*" -docletpath ./lib/umldoclet-2.1.0.jar -doclet nl.talsmasoftware.umldoclet.UMLDoclet --create-puml-files -subpackages game
# Rule to clean the workspace
# clean:
# rm -f *.class
# .PHONY: all
# all: $(BINDIR) $(CLASSES)
# $(JAVA) -cp $(BINDIR):$(LIBARYS) Main
#
# # Regel, um das Ausgabeverzeichnis zu erstellen
# $(BINDIR):
# mkdir -p $(BINDIR)
#
# $(BINDIR)/%.class: %.java | $(BINDIR)
# $(JAVAC) -d $(BINDIR) -cp $(LIBARYS) $<
# Rule to create .class files from .java files
# all:
# # $(JAVAC) -cp .:./lib/*:./native/macos/* HelloWorld.java
# $(JAVAC) $(ATTRIBUTES) HelloWorld.java
# Rule to run the application
# run:
# # $(JAVA) -Djava.library.path=native/macos -XstartOnFirstThread -cp .:./lib/*:./native/macos/* HelloWorld
# $(JAVA) $(ATTRIBUTES) HelloWorld
# Rule to clean the workspace
clean:
# rm -f *.class
rm -rf $(BINDIR)
# Replace 'Main' with the name of your main class
# Replace 'path/to/javafx-sdk/lib' with the actual path to the JavaFX SDK library