MAKE_xxxxx: to skip building OBJs part of configure

This commit is contained in:
Darryl L. Miles 2024-10-08 08:08:25 +01:00 committed by R. Timothy Edwards
parent bd541d3e6f
commit d13fa6872e
3 changed files with 38 additions and 4 deletions

View File

@ -24,8 +24,23 @@ X11HELP_PROG = XHelper7
include ${MAGICDIR}/defs.mak
SRCS = ${BASE_SRCS} ${GR_SRCS}
DEPSRCS = ${BASE_SRCS} ${X11_SRCS} ${TK_SRCS} ${TOGL_SRCS} ${TKCOMMON_SRCS} \
${OGL_SRCS} ${X11HELPER_SRCS} ${X11THREAD_SRCS} ${TCAIRO_SRCS}
DEPSRCS = ${BASE_SRCS}
ifeq (${MAKE_X11},1)
DEPSRCS += ${X11_SRCS} ${TK_SRCS}
endif
ifeq (${MAKE_GLU},1)
DEPSRCS += ${TOGL_SRCS}
endif
ifeq (${MAKE_X11},1)
DEPSRCS += ${TKCOMMON_SRCS}
endif
ifeq (${MAKE_GL},1)
DEPSRCS += ${OGL_SRCS}
endif
DEPSRCS += ${X11HELPER_SRCS} ${X11THREAD_SRCS}
ifeq (${MAKE_CAIRO},1)
DEPSRCS += ${TCAIRO_SRCS}
endif
OBJS = ${BASE_SRCS:.c=.o} ${GR_SRCS:.c=.o}
CFLAGS += ${GR_CFLAGS}
DFLAGS += ${GR_DFLAGS}

View File

@ -298,7 +298,6 @@ dnl --with-tcl=no or --with-interpreter=no, and OpenGL may be
dnl disabled with --with-opengl=no
usingOGL=1
use_libglu="-lGLU"
usingTcl=1
usingOA=0
usingCairo=1
@ -1073,6 +1072,7 @@ if test "x$enable_readline" = "xyes" ; then
else
rl_libs="\${MAGICDIR}/readline/readline/libreadline.a"
CPPFLAGS="$CPPFLAGS -I\${MAGICDIR}/readline"
use_bundled_readline=1
fi
AC_CHECK_LIB(termcap, tgetent, [
rl_libs="$rl_libs -ltermcap"
@ -1188,7 +1188,10 @@ if test $usingOGL ; then
echo "GL library files not found, disabling OpenGL"
usingOGL=
],)
AC_CHECK_LIB(GLU, gluNewTess, , [
AC_CHECK_LIB(GLU, gluNewTess, [
usingGLU=1
use_libglu="-lGLU"
], [
echo "GLU library files not found; disabling font rendering"
use_libglu=""
],)
@ -1198,6 +1201,7 @@ fi
if test "x$use_libglu" != "x" ; then
AC_DEFINE(VECTOR_FONTS)
usingGLU=1
fi
if test $usingOGL ; then
@ -1846,6 +1850,13 @@ AC_SUBST(OA_LIBS)
AC_SUBST(ALL_TARGET)
AC_SUBST(INSTALL_TARGET)
AC_SUBST(MAKE_TCL, [$usingTcl])
AC_SUBST(MAKE_X11, [$usingX11])
AC_SUBST(MAKE_GL, [$usingOGL])
AC_SUBST(MAKE_GLU, [$usingGLU])
AC_SUBST(MAKE_CAIRO, [$usingCairo])
AC_SUBST(MAKE_READLINE, [$use_bundled_readline])
AC_CONFIG_FILES([defs.mak])
AC_CONFIG_FILES([makedbh], [chmod +x makedbh])
AC_OUTPUT

View File

@ -114,3 +114,11 @@ CXX_OBJS = ${CXXSRCS:.cpp=.o}
OBJS = ${CXX_OBJS} ${C_OBJS}
LIB_OBJS = ${LIB_SRCS:.c=.o}
CLEANS = Depend ${OBJS} ${LIB_OBJS} lib${MODULE}.a lib${MODULE}.o ${MODULE}
# allows Makefile to be selective
MAKE_TCL = @MAKE_TCL@
MAKE_X11 = @MAKE_X11@
MAKE_GL = @MAKE_GL@
MAKE_GLU = @MAKE_GLU@
MAKE_CAIRO = @MAKE_CAIRO@
MAKE_READLINE = @MAKE_READLINE@