/**/
/*
* If you have Motif and want to provide support for Motif widgets in lwlib,
* then define USE_MOTIF.
*
* If you have OpenLook and want to provide support for OpenLook widgets in
* lwlib, then define USE_OLIT.
*
* Otherwise, define USE_LUCID to use Lucid's own Motif-lookalike widgets,
* which are included in this directory.
*
* You cannot define USE_MOTIF and USE_OLIT at the same time, but USE_LUCID
* may be defined along with either of the other two.
*
* The OLIT menubar is slow, and possibly buggy. We recommend against using
* it unless you'd like to try to improve it (which we encourage.)
*
* The Lucid menubar is much faster than the Motif menubar, but is missing
* a few features (most notably stay-up menus and keyboard traversal.) But
* since it has the Motif look-and-feel, we recommend using it even if you
* have Motif.
*
* Currently, only the Motif widgets provide support for dialog boxes. If
* you don't have Motif, you will not be able to pop up dialog boxes from
* emacs. If you define both USE_LUCID and USE_MOTIF, then the menus will
* be implemented with Lucid widgets, and the dialog boxes will be
* implemented with Motif widgets.
*
* It shouldn't take much work to add support for non-Motif dialog boxes;
* all that one need do is add code that implements Athena versions of the
* xm_create_dialog(), xm_update_one_widget(), and xm_update_one_value()
* routines in lwlib-Xm.c. If you do this, please send us the code.
*
* If you have your X11 source tree online, then you should define
* INCLUDE_EXTENSIONS to cause this library to contain some useful functions
* which Xt should provide but doesn't. You can only do this if you have
* the source tree online, because these functions require access to internal
* Xt data structures that are not defined in the exported header files.
* If you define INCLUDE_EXTENSIONS, then the variable $TOP must point at the
* root of the X11 source tree.
*
* To build a "shared" version of lwlib as well, define BUILD_SHARED_LIB.
* If INCLUDE_EXTENSIONS is defined, and you want to link with a dynamic
* version of Xt, it may be necessary to build a shared version of lwlib as
* well, as the X libraries sometimes put *different code* in the dynamic
* and shared versions of their libraries, for some reason I don't understand.
*
* Remember, if you build and install a shared version of lwlib, you may need
* to run ldconfig(8) before anything will realize that it exists.
*
* To compile with support for Lucid's Energize Programming System, you must
* define all of ENERGIZE, USE_LUCID, USE_MOTIF, and INCLUDE_EXTENSIONS.
*/
/* /* /* /*
/*
TOP = /$(WHICH_X)/mit
/*
*
* You shouldn't need to edit anything below this point.
*
*/
ERROR! Energize requires Lucid widgets, Motif, and X Extensions.
SOLWREV=1.0
STD_DEFINES = LibraryDefines
CDEBUGFLAGS = LibraryCDebugFlags
EXT_DEFINES = -DTHIS_IS_X11R4
WHICH_X = x11r4
EXT_DEFINES = -DTHIS_IS_X11R5 -DINCLUDE_ALLOCA_H
WHICH_X = x11r5
EXT_DEFINES = "ERROR! Imakefile was unable to determine whether this is X11r4 or X11r5."
LUCID_SRCS = lwlib-Xlw.c xlwmenu.c
LUCID_OBJS = lwlib-Xlw.o xlwmenu.o
MOTIF_SRCS = lwlib-Xm.c
MOTIF_OBJS = lwlib-Xm.o
OLIT_SRCS = lwlib-Xol.c lwlib-Xol-mb.c
OLIT_OBJS = lwlib-Xol.o lwlib-Xol-mb.o
EXT_SRCS = dispatch.c xrdb-cpp.c xrdb.c
EXT_OBJS = dispatch.o xrdb-cpp.o xrdb.o
TOOLKIT_DEFINES = "ERROR! You cannot define both USE_MOTIF and USE_OLIT at the same time (in Imakefile)."
TOOLKIT_DEFINES = -DUSE_MOTIF -DUSE_LUCID
TOOLKIT_SRCS = $(MOTIF_SRC) $(LUCID_SRCS)
TOOLKIT_OBJS = $(MOTIF_OBJS) $(LUCID_OBJS)
DEFINES = -DUSE_OLIT -DUSE_LUCID
TOOLKIT_SRCS = $(OLIT_SRC) $(LUCID_SRCS)
TOOLKIT_OBJS = $(OLIT_OBJS) $(LUCID_OBJS)
TOOLKIT_DEFINES = -DUSE_OLIT
TOOLKIT_SRCS = $(OLIT_SRC)
TOOLKIT_OBJS = $(OLIT_OBJS)
TOOLKIT_DEFINES = -DUSE_MOTIF
TOOLKIT_SRCS = $(MOTIF_SRC)
TOOLKIT_OBJS = $(MOTIF_OBJS)
TOOLKIT_DEFINES = -DUSE_LUCID
TOOLKIT_SRCS = $(LUCID_SRC)
TOOLKIT_OBJS = $(LUCID_OBJS)
TOOLKIT_DEFINES = "ERROR! At least one of USE_MOTIF, USE_LUCID or USE_OLIT must be defined in Imakefile."
EZ_OBJS = "ERROR! ENERGIZE requires USE_MOTIF to be defined in Imakefile."
EZ_OBJS = energize/blpsheet.o energize/build.o energize/classbr_ps.o \
energize/ctreebr_ps.o energize/debuggerps.o \
energize/editmode.o energize/leb_psheet.o \
energize/projectdisp.o energize/projectps.o \
energize/search.o energize/target.o
ENERGIZEP = -DENERGIZE
SRCS = lwlib.c $(TOOLKIT_SRCS) lwlib-utils.c $(EXT_SRCS)
OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o $(EXT_OBJS) $(EZ_OBJS)
EXT_FLAGS = -I$(TOOLKITSRC) $(EXT_DEFINES)
LIBNAME = liblw.a
all::
@if [ ! -d shared ]; then mkdir shared; else exit 0; fi
@if [ ! -d energize/shared ]; then mkdir energize/shared; \
else exit 0; fi
@if [ ! -h shared/energize ]; \
then cd shared ; ln -s ../energize/shared energize ; \
else exit 0; fi
clean::
$(RM) shared/energize
SharedLibraryObjectRule ()
NormalSharedLibraryTarget(lw,$(SOLWREV),$(OBJS))
LibraryObjectRule ()
SharedLibraryTarget(lw,$(SOLWREV),$(OBJS),shared,..)
NormalLibraryObjectRule ()
NormalLibraryTarget (lw,$(OBJS))
MakefileSubdirs (energize)
DependTarget ()
energize/Imakefile:
-mkdir energize
-(cd energize ; sh -c "ln -s ../$(VPATH)/energize/* .")
/* Imakefile, since that's the only thing down there that changes */
energize/Makefile: energize/Imakefile Imakefile
$(MAKE) $(MFLAGS) Makefiles
Makefile::
$(RM) energize/Makefile
$(EZ_OBJS): energize/Makefile
${RM} $@ ; cd energize ; $(MAKE) $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)"
clean::
cd energize ; $(MAKE) $(MFLAGS) clean
CPPDEFS=-DCPP_PROGRAM=\"CppCmd\"
LWObjectRule (lwlib.o, lwlib.c, $(TOOLKIT_DEFINES))
LWObjectRule (dispatch.o, dispatch.c, $(EXT_FLAGS))
LWObjectRule (xrdb-cpp.o, xrdb-cpp.c, $(EXT_FLAGS) "$(CPPDEFS)")
LWObjectRule (xrdb.o, xrdb.c, $(EXT_FLAGS))
LWObjectRule (lwlib-Xm.o, lwlib-Xm.c, $(ENERGIZEP))
lwlib-utils.o: lwlib-utils.h
lwlib.o: lwlib.h lwlib-internal.h
lwlib-Xlw.o: lwlib.h lwlib-internal.h
lwlib-Xm.o: lwlib.h lwlib-internal.h lwlib-utils.h
lwlib-Xol.o: lwlib.h lwlib-internal.h
lwlib-Xol-mb.o: lwlib-Xol-mb.h lwlib-Xol-mbP.h