# Makefile for Parenthetcl # # Copyright (c) 2004-2006 Henry Strickland # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # # (* http://www.opensource.org/licenses/mit-license.php *) # ./configure will fix these: PREFIX = @PREFIX@ TCLROOT = @TCLROOT@ CC = @CC@ INCLUDES = -I$(TCLROOT)/include OPT = -O3 OPT_G = -g CFLAGS = $(INCLUDES) $(OPT) $(P7EXTRACFLAGS) CFLAGS_G = $(INCLUDES) $(OPT_G) $(P7EXTRACFLAGS) all : libp7tcl.a libp7tcl_g.a clean : rm -f *.o *.so *.a ___*.? cd tests ; make clean test : mk-tests-mk all cd tests ; make all tests : mk-tests-mk all cd tests ; make tests # just the non-debug ones tests_g : mk-tests-mk all cd tests ; make tests_g # just the debug ones valgrind : mk-tests-mk all cd tests ; make P7GRIND='valgrind -q' tests tests_g mk-tests-mk : cd tests ; rm -f Makefile ; sh mk-makefile.sh > Makefile ; chmod -w Makefile libp7tcl.a : p7array.o p7base.o rm -f libp7tcl.a ar qc libp7tcl.a p7array.o p7base.o ranlib libp7tcl.a libp7tcl_g.a : p7array_g.o p7base_g.o rm -f libp7tcl_g.a ar qc libp7tcl_g.a p7array_g.o p7base_g.o ranlib libp7tcl_g.a p7array.o : parenthetcl.h p7array.h p7array_decl.h p7array_impl.h p7array.c $(CC) -c -o p7array.o $(CFLAGS) p7array.c p7base.o : parenthetcl.h p7array.h p7array_decl.h p7array_impl.h p7base.c $(CC) -c -o p7base.o $(CFLAGS) p7base.c p7array_g.o : parenthetcl.h p7array.h p7array_decl.h p7array_impl.h p7array.c $(CC) -c -o p7array_g.o $(CFLAGS_G) -D'DEBUG' p7array.c p7base_g.o : parenthetcl.h p7array.h p7array_decl.h p7array_impl.h p7base.c $(CC) -c -o p7base_g.o $(CFLAGS_G) -D'DEBUG' p7base.c install: libp7tcl.a libp7tcl_g.a install -D -m 555 p7c $(PREFIX)/bin/p7c install -D -m 444 p7translate.tcl $(PREFIX)/lib/p7translate.tcl install -D -m 444 libp7tcl.a $(PREFIX)/lib/libp7tcl.a install -D -m 444 libp7tcl_g.a $(PREFIX)/lib/libp7tcl_g.a install -D -m 444 parenthetcl.h $(PREFIX)/include/parenthetcl.h install -D -m 444 p7array.h $(PREFIX)/include/p7array.h install -D -m 444 p7array_decl.h $(PREFIX)/include/p7array_decl.h distclean : clean rm -f Makefile p7c tests/mk-makefile.sh tests/Makefile .config.sh chmod +x configure tarball : distclean B=`basename \`pwd\``; cd .. ; tar czf `date +/tmp/parenthetcl-%Y-%m-%d-%H%M%S.tgz` --exclude RCS --exclude _darcs $$B #END