X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=base%2Fcommon.make;h=3415a56f474f6fb0b21fbf7014f4e546bfd5e0ac;hp=d5db198ec7288828869827489d22eb1de6df339e;hb=403ef0f3eb85708789afeec1048ad1b6a7b667f6;hpb=ec52df6e97d2bb161997a61caf46c074d6dcd38d diff --git a/base/common.make b/base/common.make index d5db198..3415a56 100644 --- a/base/common.make +++ b/base/common.make @@ -19,6 +19,8 @@ VERSION ?= 1 FAMILY ?= chiark_tcl +TCL_VERSION ?= 8.3 +TCL_INCLUDEDIR ?= /usr/include/tcl$(TCL_VERSION) OPTIMISE ?= -O2 TCL_MEM_DEBUG ?= -DTCL_MEM_DEBUG @@ -27,13 +29,18 @@ TCMDIFGEN ?= $(BASE_DIR)/tcmdifgen BASE_TCT ?= $(BASE_DIR)/base.tct 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) -Wno-strict-aliasing -E -x c /dev/null >/dev/null || echo x),) +CFLAGS += -Wno-strict-aliasing +endif + +CPPFLAGS += -I$(TCL_INCLUDEDIR) -I$(BASE_DIR) CPPFLAGS += $(TCL_MEM_DEBUG) AUTOS += $(AUTO_SRCS) $(AUTO_HDRS)