aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-05-25 09:33:55 +1000
committerSteve Bennett <steveb@workware.net.au>2023-06-22 08:18:48 +1000
commit32fb54d3fc60c97b865617ef8751562e3474e320 (patch)
tree9e1a8a41860dca4ac3d6b7af386e9df34dd581bf
parent6894d4378bc36d0fbe1b89e168b9108c69ee5b41 (diff)
downloadjimtcl-32fb54d3fc60c97b865617ef8751562e3474e320.zip
jimtcl-32fb54d3fc60c97b865617ef8751562e3474e320.tar.gz
jimtcl-32fb54d3fc60c97b865617ef8751562e3474e320.tar.bz2
build: Add -I. as the first include path
If building on a system with an installed jim.h, we want to be sure to pick up the local jim headers in preference. Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--Makefile.in18
-rw-r--r--auto.def6
2 files changed, 12 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in
index 6d46535..29c226b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,9 +40,15 @@ SHOBJ_LDFLAGS ?= @SHOBJ_LDFLAGS@
@else
SHOBJ_LDFLAGS ?= @SHOBJ_LDFLAGS_R@
@endif
-AS_CFLAGS = @AS_CFLAGS@
-AS_CXXFLAGS = @AS_CFLAGS@
-AS_CPPFLAGS = @AS_CPPFLAGS@
+@if [get-define srcdir] ne "."
+VPATH := @srcdir@
+AS_CFLAGS = -I@srcdir@
+AS_CXXFLAGS = -I@srcdir@
+@endif
+
+AS_CFLAGS += @AS_CFLAGS@
+AS_CXXFLAGS += @AS_CFLAGS@
+AS_CPPFLAGS += @AS_CPPFLAGS@
CFLAGS ?= @CFLAGS@
CXXFLAGS ?= @CXXFLAGS@
LDFLAGS = @LDFLAGS@
@@ -53,12 +59,6 @@ prefix ?= @prefix@
docdir = @docdir@
srcdir := @srcdir@
-AS_CPPFLAGS += -Wall -I.
-@if [get-define srcdir] ne "."
-AS_CPPFLAGS += -I@srcdir@
-VPATH := @srcdir@
-@endif
-
@if JIM_STATICLIB
LIBJIM := libjim.a
@else
diff --git a/auto.def b/auto.def
index 7e35f96..d9058bf 100644
--- a/auto.def
+++ b/auto.def
@@ -208,9 +208,9 @@ cc-check-types "long long"
cc-check-sizeof int
# Default optimisation
-define-append AS_CPPFLAGS -O2
-
-define-append AS_CPPFLAGS -D_GNU_SOURCE
+define-append AS_CPPFLAGS -O2 -Wall -D_GNU_SOURCE
+define-append AS_CFLAGS -I.
+define-append AS_CXXFLAGS -I.
# check, but don't add to -cflags
cc-with {} {