X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=base%2Fcommon.make;h=b0d4bae8bc4e251b21dc6093f437726d58dd8bdf;hp=c24170ef0c208b22ec2175a86cac3072d2b83d36;hb=5f66b4d08a96e0effeed6b84c73bb0d82edceefa;hpb=40a4738e440a8412c61a12eca34ed6aa98d71a5a diff --git a/base/common.make b/base/common.make index c24170e..b0d4bae 100644 --- a/base/common.make +++ b/base/common.make @@ -1,12 +1,44 @@ +# base code for various Tcl extensions +# Copyright 2006-2012 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, see . + + +VERSION ?= 1 +FAMILY ?= chiark_tcl +TCL_VERSION ?= 8.4 +TCL_INCLUDEDIR ?= /usr/include/tcl$(TCL_VERSION) + OPTIMISE ?= -O2 TCL_MEM_DEBUG ?= -DTCL_MEM_DEBUG TCMDIFGEN ?= $(BASE_DIR)/tcmdifgen BASE_TCT ?= $(BASE_DIR)/base.tct +BASE_SHLIB ?= lib$(FAMILY)-$(VERSION) CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \ $(OPTIMISE) -CPPFLAGS += -I$(BASE_DIR) + +ifeq ($(shell $(CC) -Wno-pointer-sign -E -x c /dev/null >/dev/null || echo x),) +CFLAGS += -Wno-pointer-sign +endif + +ifeq ($(shell $(CC) -fno-strict-aliasing -E -x c /dev/null >/dev/null || echo x),) +CFLAGS += -fno-strict-aliasing +endif + +CPPFLAGS += -I$(TCL_INCLUDEDIR) -I$(BASE_DIR) CPPFLAGS += $(TCL_MEM_DEBUG) AUTOS += $(AUTO_SRCS) $(AUTO_HDRS)