-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (28 loc) · 866 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
33
34
HOSTNAME=$(shell hostname)
ifeq "$(HOSTNAME)" "omega.uta.edu"
#change the JDKPATH if you are using omega.uta.edu
JDKPATH = /opt/jdk1.6.0_20
else ifeq "$(HOSTNAME)" "acadcseapp01.uta.edu"
#change the JDKPATH if you are using omega-csee.uta.edu
JDKPATH = /etc/alternatives/java_sdk
else
#change the JDKPATH if you are using a different host
JDKPATH = /usr
endif
# path to additional Classes
CLASSPATH = .
BINPATH = $(JDKPATH)/bin
JAVAC = $(JDKPATH)/bin/javac -classpath $(CLASSPATH)
JAVA = $(JDKPATH)/bin/java -classpath $(CLASSPATH)
# build the target class
TARGET = hello
TARGETCLASS = Hello
all : $(TARGET)
$(TARGET): $(TARGET).java
@echo Compiling $(TARGETCLASS)
$(JAVAC) $(TARGET).java
@echo Build complete
@echo To run this program type \"java $(TARGETCLASS)\"
clean :
$(RM) $(TARGETCLASS).class
@echo Removing $(TARGETCLASS).class