X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=base%2Fcommon.make;h=b736610bf3a99445fbc7fe8cd708abfe6cd40c15;hp=12259fafc24fd6689f703e6bf076f4785e76e553;hb=f63331266eb17877332738f80f622c94e924c118;hpb=a21a27a006e63f6bd45953bb8783e1fa7e3e589f diff --git a/base/common.make b/base/common.make index 12259fa..b736610 100644 --- a/base/common.make +++ b/base/common.make @@ -1,20 +1,46 @@ +# base code for various Tcl extensions +# Copyright 2006 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, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + VERSION ?= 1 FAMILY ?= chiark_tcl +TCL_VERSION ?= 8.3 +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 ?= $(FAMILY)-$(VERSION) +BASE_SHLIB ?= lib$(FAMILY)-$(VERSION) + +CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \ + $(OPTIMISE) ifeq ($(shell $(CC) -Wno-pointer-sign -E -x c /dev/null >/dev/null || echo x),) CFLAGS += -Wno-pointer-sign endif -CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \ - $(OPTIMISE) -CPPFLAGS += -I$(BASE_DIR) +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)