[Bio] / smc / Makefile Repository:
ViewVC logotype

View of /smc/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (annotate)
Fri Sep 26 19:36:17 2003 UTC (16 years, 2 months ago) by park
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -1 lines
Extend to generate Python statemachines.
   o  smc  < foo.sm   makes c++
   o  smc -c < foo.sm makes c++
   o  smc -p < foo.sm makes python

The yacc is written (originally) to call GenStateMap when the
end of the document is hit.  We make GenStateMap call
generator which is a ptr to function.  We set the fn
to call in main via command line opts.

#$Id: Makefile,v 1.2 2003/09/26 19:36:17 park Exp $
#------------------------------------------
# Makefile for Linux/Unix
#
PROGRAM		  = smc
CPPFLAGS      = 
LIB_PATHS     = 
CFLAGS        = -g 
YACCFILE      = smy.y
YACCFILE.c    =	$(YACCFILE:.y=.c)
YACCFILE.h    =	$(YACCFILE:.y=.h)
LEXFILE       =	sml.l
LEXFILE.c     =	$(LEXFILE:.l=.c)

# **************************************************
# * Uncomment the following "LIBS" line if you get *
# * linker errors complaining about yywrap         *
# **************************************************
LIBS          = -ll

SOURCES = sm.c $(LEXFILE.c) $(YACCFILE.c)
OBJECTS = $(SOURCES:.c=.o)
LINTFILES = $(SOURCES) $(YACCFILE.c) $(LEXFILE.c)
SHARFILES = stripFSM.sm stripper.cc stContext.h sm.c sml.l smy.y \
            smc.doc Makefile makefile.bcc

################################################################

.KEEP_STATE :
all : smc stripper

$(PROGRAM) : $(OBJECTS)
	cc $(CFLAGS) $(LDFLAGS) -o smc $(OBJECTS) $(LIBS)

$(LEXFILE.c) : $(LEXFILE) $(YACCFILE.h)
	$(LEX.l) <$(LEXFILE) >$(LEXFILE.c)

$(YACCFILE.c) + $(YACCFILE.h) : $(YACCFILE)
	$(YACC.y) -d $(YACCFILE)
	mv y.tab.c $(YACCFILE.c)
	mv y.tab.h $(YACCFILE.h)

stripper : stripper.o stripFSM.o stripFSM.h 
	$(LINK.cc) -o $@  stripper.o stripFSM.o 

stripper.o : stripFSM.h stContext.h

stripFSM.h stripFSM.cc : stripFSM.sm smc
	./smc <stripFSM.sm

smc.shar : $(SHARFILES)
	shar -c -m $(SHARFILES) >$@

clean:
	rm -f *.o smy.c smy.h sml.c smc stripFSM.cc stripFSM.h stripper 

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3