# $Id: Makefile,v 1.39 2005/01/26 09:01:27 mah Exp $ CC=gcc CFLAGS=-Wall -w -O3 -g CXX=g++ CXXFLAGS=-Wall -w -O3 -g LIBS=-lfl -lm TARGET=pvs2hdl OBJ = pvs_parser.tab.o lex.yy.o tools.o main.o constant.o synthesize_core.o synthesize_type.o parser_typen.o stringlist.o verilogmodule.o shared_lists.o types_and_functions_core.o types_and_functions_add.o types_and_functions_libs.o config.o SRCS = pvs_parser.tab.c lex.yy.c tools.c main.cpp constant.c synthesize_core.cpp synthesize_type.cpp parser_typen.c stringlist.c verilogmodule.cpp shared_lists.cpp types_and_functions_core.cpp types_and_functions_add.cpp types_and_functions_libs.cpp config.cpp all: $(OBJ) $(CXX) -o $(TARGET) $(OBJ) $(LIBS) depend: $(SRCS) mkdep ${CFLAGS} ${SRCS} pvs_parser.tab.c: pvs_parser.y bison -d pvs_parser.y lex.yy.c: pvs_lexer.l pvs_parser.tab.c flex -i pvs_lexer.l clean: rm -f pvs_parser.tab.c pvs_parser.tab.h lex.yy.c help_*.c *~ *.gdl $(OBJ) $(TARGET) # tools.c #include's a generated text on the command-line options (from the man page) tools.o: help_options.c help_usage.c help_options.c: pvs2hdl.1 ( echo // Automatically generated, see Makefile; groff -t -e -mandoc -Tascii $< | perl -ne 's/\e\[\d+m//g; s/.\010//g; s/\t/ /g; s/^OPTIONS\n// .. s/^[A-Z]{4,}\n// and s/\n/\\n/ and print qq."$$_"\n.' ) > $@ help_usage.c: pvs2hdl.1 ( echo // Automatically generated, see Makefile; groff -t -e -mandoc -Tascii $< | perl -ne 's/\e\[\d+m//g; s/.\010//g; s/\t/ /g; s/^SYNOPSIS\n// .. s/^[A-Z]{4,}\n// and s/\n/\\n/ and print qq."$$_"\n.' ) > $@ # Note on deb target: # The corresponding targets in the dlxasm/Makefile should be considered the # `master' for these targets. # # Even while you may build a package from any CVS snapshot, make sure # that you update debian/changelog *and* commit before any `real release'. # # TODO check if everything was committed / was up to date wrt to the repository version # TODO check whether there's is a corresponding version entry in ./debian/ deb: DIR=pvs2hdl-`date +%Y%m%d`; \ cvs export -D now -d $${DIR} PVS/software/pvs2hdl && \ rm -rf $${DIR}/fopra_ausarbeitung_dirkl && \ mkdir tmp && \ mv $${DIR} tmp && \ cd tmp && \ tar -czf $${DIR}.tar.gz $${DIR} && \ cd $${DIR} && \ dpkg-buildpackage -rfakeroot -k400074DA && \ cd .. && \ mv *_*.* .. && \ cd .. && \ rm -rf tmp # takes the current directory and uses it for testing the build process # the ./tmp/ directory is *not* removed for inspection of the build snapshot deb_quicktest: DIR=pvs2hdl-`date +%Y%m%d`; \ mkdir ../$${DIR} && \ cp -a . ../$${DIR} && \ rm -rf ../$${DIR}/{,debian/}CVS && \ rm -rf ../$${DIR}/fopra_ausarbeitung_dirkl && \ mkdir tmp && \ mv ../$${DIR} tmp && \ cd tmp && \ tar -czf $${DIR}.tar.gz $${DIR} && \ cd $${DIR} && \ dpkg-buildpackage -rfakeroot -uc -us