1 #############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 ###########################
13 ###########################
17 ##############################
18 # Environment variables #
19 ##############################
21 JAVA = $(JAVA_HOME)/bin/java
22 JAVAC = $(JAVA_HOME)/bin/javac
23 JAVACOPTS = -deprecation
24 JAVACC = $(JAVAC) $(JAVACOPTS)
25 RMIC = $(JAVA_HOME)/bin/rmic
26 RMIREGISTRY= $(JAVA_HOME)/bin/rmiregistry
27 CLASSPATH = .:$(J2EE_HOME)/lib/j2ee.jar:$(JAVA_HOME)/jre/lib/rt.jar
28 JAVADOC = $(JAVA_HOME)/javadoc
31 #########################
33 #########################
35 Servlets = Config TimeManagement BrowseCategories Auth RegisterUser RubbosHttpServlet BrowseRegions SearchItemsByCategory SearchItemsByRegion ViewItem ViewBidHistory ViewUserInfo SellItemForm RegisterItem PutCommentAuth PutComment StoreComment BuyNowAuth BuyNow StoreBuyNow PutBidAuth PutBid StoreBid AboutMe
37 all_servlets_sources = $(addprefix edu/rice/rubbos/servlets/, $(addsuffix .java, $(Servlets)))
38 all_servlets_obj = $(addprefix edu/rice/rubbos/servlets/, $(addsuffix .class, $(Servlets)))
40 servlets: $(all_servlets_obj)
43 rm -f edu/rice/rubbos/servlets/*.class
49 ClientFiles = URLGenerator URLGeneratorPHP RUBBoSProperties Stats \
50 TransitionTable ClientEmulator UserSession
52 all_client_sources = $(addprefix edu/rice/rubbos/client/, $(addsuffix .java, $(ClientFiles)))
53 all_client_obj = $(addprefix edu/rice/rubbos/client/, $(addsuffix .class, $(ClientFiles))) edu/rice/rubbos/beans/TimeManagement.class
55 client: $(all_client_obj)
58 ${JAVA} -classpath .:./database edu.rice.rubbos.client.InitDB ${PARAM}
61 ${JAVA} -classpath Client:Client/rubbos_client.jar:. -Xms256m -Xmx2048m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator
64 ${JAVA} -classpath Client:Client/rubbos_client.jar:. -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Xms128m -Xmx1024m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator
67 ############################
69 ############################
72 all: beans ejb_servlets client javadoc flush_cache
77 ${JAVADOC} -d ./doc/api -bootclasspath ${CLASSPATH} -version -author -windowtitle "RUBBoS API" -header "<b>RUBBoS (C)2001 Rice University/INRIA</b><br>" edu.rice.rubbos.beans edu.rice.rubbos.beans.servlets edu.rice.rubbos.client
80 rm -f core edu/rice/rubbos/beans/*.class edu/rice/rubbos/beans/JOnAS* edu/rice/rubbos/beans/servlets/*.class edu/rice/rubbos/client/*.class edu/rice/rubbos/servlets/*.class
83 ${JAVACC} -classpath ${CLASSPATH} $<
85 flush_cache: bench/flush_cache.c
86 gcc bench/flush_cache.c -o bench/flush_cache