1#
2# The contents of this file are subject to the Mozilla Public
3# License Version 1.1 (the "License"); you may not use this file
4# except in compliance with the License. You may obtain a copy of
5# the License at http://www.mozilla.org/MPL/
6#
7# Software distributed under the License is distributed on an "AS
8# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9# implied. See the License for the specific language governing
10# rights and limitations under the License.
11#
12# The Original Code is State Machine Compiler (SMC).
13#
14# The Initial Developer of the Original Code is Charles W. Rapp.
15# Portions created by Charles W. Rapp are
16# Copyright (C) 2000 - 2004. Charles W. Rapp.
17# All Rights Reserved.
18#
19# Contributor(s):
20#
21# RCS ID
22# $Id: Makefile,v 1.4 2005/05/28 13:51:24 cwrapp Exp $
23#
24# CHANGE LOG
25# (See the bottom of this file.)
26#
27
28#################################################################
29# Macros.
30#
31
32SM_SOURCES=     AppClass.sm
33SOURCES=        $(SM_SOURCES:%.sm=%Context.java) \
34                AppClass.java \
35                checkstring.java
36
37JAVAC=          javac
38JAVAC_FLAGS=    -g -classpath ../../../lib/statemap.jar
39
40# Uncomment to turn on reflection.
41# REFLECT = 	-reflect
42
43SMC=            java -jar ../../../bin/Smc.jar
44SMC_FLAGS=      -java -g $(REFLECT)
45
46#################################################################
47# Rules.
48#
49
50%Context.java : %.sm
51		$(SMC) $(SMC_FLAGS) $<
52
53%_sm.dot :	%.sm
54		$(SMC) -graph -glevel 1 $<
55
56all :           checkstring
57
58checkstring :   $(SOURCES)
59		$(JAVAC) $(JAVAC_FLAGS) $(SOURCES)
60
61graph :		$(SM_SOURCES:%.sm=%_sm.dot)
62
63clean :
64		-rm -f *.class *Context.java *_sm.dot
65
66#
67# CHANGE LOG
68# $Log: Makefile,v $
69# Revision 1.4  2005/05/28 13:51:24  cwrapp
70# Update Java examples 1 - 7.
71#
72# Revision 1.1  2004/10/30 12:01:21  charlesr
73# Added Graphviz rules.
74#
75# Revision 1.0  2003/12/14 19:58:50  charlesr
76# Initial revision
77#
78# Revision 1.1.1.1  2001/01/03 03:14:00  cwrapp
79#
80# ----------------------------------------------------------------------
81# SMC - The State Map Compiler
82# Version: 1.0, Beta 3
83#
84# SMC compiles state map descriptions into a target object oriented
85# language. Currently supported languages are: C++, Java and [incr Tcl].
86# SMC finite state machines have such features as:
87# + Entry/Exit actions for states.
88# + Transition guards
89# + Transition arguments
90# + Push and Pop transitions.
91# + Default transitions.
92# ----------------------------------------------------------------------
93#
94# Revision 1.1.1.1  2000/08/02 12:51:02  charlesr
95# Initial source import, SMC v. 1.0, Beta 1.
96#
97