Commit eee385da authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

added rules for making compiler and lib

parent 6de6a6b8
LCDIR=../..
LCC=java -jar ${LCDIR}/compiler/labComm.jar
CLASSPATH=.:${LCDIR}/lib/java/labcomm.jar
LCCJAR=${LCDIR}/compiler/labComm.jar
LCLJAR=${LCDIR}/lib/java/labcomm.jar
JAVA_PKG=labcommTCPtest
.PHONY : clean run runserver runOSserver runclient
......@@ -14,25 +14,33 @@ run : ${JAVA_PKG}/Example.class ${JAVA_PKG}/server/TestServer.class ${JAVA_PKG}/
### dependencies and parts ####################
###############################################
${JAVA_PKG}/gen/FooSample.java: test.lc
LCC=java -jar ${LCCJAR}
CLASSPATH=.:${LCLJAR}
${LCCJAR} :
cd ${LCDIR} && make make-compiler
${LCLJAR} :
cd ${LCDIR}/lib/java && make labcomm.jar
${JAVA_PKG}/gen/FooSample.java: test.lc ${LCCJAR}
${LCC} --javapackage=${JAVA_PKG}.gen --java=${JAVA_PKG}/gen $<
${JAVA_PKG}/gen/FooSample.class: ${JAVA_PKG}/gen/FooSample.java
${JAVA_PKG}/gen/FooSample.class: ${JAVA_PKG}/gen/FooSample.java ${LCLJAR}
javac -cp ${CLASSPATH} $<
${JAVA_PKG}/Example.class: ${JAVA_PKG}/Example.java ${JAVA_PKG}/gen/FooSample.class
${JAVA_PKG}/Example.class: ${JAVA_PKG}/Example.java ${JAVA_PKG}/gen/FooSample.class ${LCLJAR}
javac -cp ${CLASSPATH} $<
${JAVA_PKG}/server/TestServer.class: ${JAVA_PKG}/server/TestServer.java ${JAVA_PKG}/gen/FooSample.class
${JAVA_PKG}/server/TestServer.class: ${JAVA_PKG}/server/TestServer.java ${JAVA_PKG}/gen/FooSample.class ${LCLJAR}
javac -cp ${CLASSPATH} $<
${JAVA_PKG}/server/OneShotServer.class: ${JAVA_PKG}/server/OneShotServer.java ${JAVA_PKG}/gen/FooSample.class
${JAVA_PKG}/server/OneShotServer.class: ${JAVA_PKG}/server/OneShotServer.java ${JAVA_PKG}/gen/FooSample.class ${LCLJAR}
javac -cp ${CLASSPATH} $<
${JAVA_PKG}/client/TestClient.class: ${JAVA_PKG}/client/TestClient.java ${JAVA_PKG}/gen//FooSample.class
${JAVA_PKG}/client/TestClient.class: ${JAVA_PKG}/client/TestClient.java ${JAVA_PKG}/gen//FooSample.class ${LCLJAR}
javac -cp ${CLASSPATH} $<
runserver : ${JAVA_PKG}/server/TestServer.class
java -cp ${CLASSPATH} $(<:.class=)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment