blob: dc3172d023b9fd62b838d59d0b26963ab592ae90 (
plain)
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
|
@echo off
echo Computer Networks and Distributed Systems Coursework - Build Utility
echo (c) Daniele Sgandurra, Imperial College London, Mar 2016
echo.
if "%1"=="" goto lUsage
REM Select target to be built
if "%1"=="all" goto lBuildStart
if "%1"=="rmi" goto lBuildRMI
if "%1"=="udp" goto lBuildUDP
if "%1"=="tcp" goto lBuildTCP
if "%1"=="clean" goto lClean
REM Missing a Target
echo Target not recongnised
goto lEnd
REM Targets
:lBuildStart
:lBuildRMI
echo Building RMI Classes ...
cd common
javac -g -classpath . *.java
cd ..\rmi
javac -g -classpath .;.. *.java
cd ..
rmic rmi.RMIServer
echo.
if not "%1"=="all" goto lEnd
:lBuildUDP
echo Building UDP Client / Server...
cd common
javac -g -classpath . *.java
cd ..\udp
javac -g -classpath .. *.java
cd ..
echo.
if not "%1"=="all" goto lEnd
:lBuildEnd
goto lEnd
:lClean
del common\*.class
del rmi\*.class
del udp\*.class
echo.
goto :lEnd
REM End Targets
:lUsage
echo Usage: build 'target' (rmi / udp)
goto lEnd
:lEnd
echo Done!
echo.
|