XCOMM BUILD INSTRUCTIONS (ALSO SEE NOTES):
XCOMM -------------------
XCOMM Step 1. xmkmf -a
XCOMM Step 2. make all 

XCOMM -----
XCOMM NOTES
XCOMM ----- 
XCOMM If using /usr/openwin/bin/xmkmf, replace step 1 with:
XCOMM 1. xmkmf; make makefiles; make includes; make depend
XCOMM
XCOMM If building with Motif and HTML replace step 2 with:
XCOMM 2. make all EXTRA_DEFINES="-DMOTIF -DHAVE_HTML"
XCOMM

XCOMM CUSTOMIZING INSTRUCTIONS: To customize xmotd, uncomment
XCOMM the "#define" statments appropriately.

XCOMM If you wish to use an HTML widget instead of an ASCII text widget,
XCOMM then uncomment the following line:
XCOMM #define HAVE_HTML

XCOMM If you wish to use colour xpm pixmaps for the icon and have the
XCOMM Xpm library installed, then uncomment the following line: 
XCOMM #define HAVE_XPM

XCOMM If you wish to build with Motif, then uncomment the following line:
XCOMM #define MOTIF

XCOMM If compiling MOTIF under SOLARIS 2.x (or CDE on other platforms
XCOMM (untested)),  uncomment the following line: 
XCOMM #define SOLARIS2

#ifdef MOTIF
#ifdef SOLARIS2 

XCOMM These are set if you are building on Solaris 2.x/CDE. You may
XCOMM have to set LD_LIBRARY_PATH when you run it (use a shell
XCOMM wrapper around xmotd).

 MOTIF_SOLARIS_LD_FLAG = -R/usr/dt/lib
         MOTIF_LIB_DIR = -L/usr/dt/lib 
         MOTIF_INCLUDE = -I/usr/dt/include
#else

XCOMM On other systems, if the Motif libs & includes are NOT installed
XCOMM in /usr/lib and /usr/include then uncomment and fill-in the following
XCOMM paths appropriately.

XCOMM         MOTIF_LIB_DIR = -L
XCOMM         MOTIF_INCLUDE = -I

#endif
#endif

XCOMM Don't touch anything past this point unless you know what you're doing.
XCOMM --x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--

XCOMM          CC = purify gcc

             SRCS = main.c xmotd.c changed.c textmode.c usage.c browser.c logo.c atom.c
             OBJS = main.o xmotd.o changed.o textmode.o usage.o browser.o logo.o atom.o
            INCLS = maindefs.h appdefs.h main.h

      CDEBUGFLAGS = -g
        MANSUFFIX = 8

         MANIFEST = README GNU ACKNOWLEDGEMENTS Imakefile browser\
					Makefile XMotd XMotd_motif xmotd.8 xlogo.bm xlogo.xpm\
					$(SRCS) $(INCLS)

XCOMM No space after the equals-sign
              VER =1.17.3b
             LITE =1.17.3b

.PRECIOUS: distrib

#ifdef HPArchitecture
        CCOPTIONS = -Aa -D_HPUX_SOURCE
#endif

#ifdef HAVE_XPM
          XPM_LIB = -lXpm
       XPM_DEFINE = -DHAVE_XPM
#endif

#ifdef HAVE_HTML
      HTML_DEFINE = -DHAVE_HTML
     HTML_SUB_DIR = ./libhtmlw
     HTML_DEP_LIB = htmlw
     HTML_LIB_DIR = -L$(HTML_SUB_DIR)
     HTML_INCLUDE = -I$(HTML_SUB_DIR)
         HTML_LIB = -lhtmlw

         MAKELIST = $(HTML_SUB_DIR)           

#endif

#ifdef MOTIF
    MOTIF_DEFINE = -DMOTIF
       MOTIF_LIB = -lXm
 LD_LIBRARY_PATH = $(MOTIF_SOLARIS_LD_FLAG)
#endif

    EXTRA_DEFINES = $(XPM_DEFINE) $(HTML_DEFINE) $(MOTIF_DEFINE)
   MOTD_LIBRARIES = $(XPM_LIB)  $(HTML_LIB_DIR) $(HTML_LIB) $(MOTIF_LIB_DIR) $(MOTIF_LIB) 
   EXTRA_INCLUDES = $(HTML_INCLUDE) $(MOTIF_INCLUDE)

XCOMM This is what the final link looks like:
XCOMM LOCAL_LIBRARIES = -lXm -lXmu -lXt -lXext -lX11 -lsocket -lgen -lucb  -L/usr/ucblib -R/usr/ucblib -R/usr/X11R6/lib

  LOCAL_LIBRARIES = $(MOTD_LIBRARIES) XawClientLibs
          DEPLIBS = $(HTML_DEP_LIB) 

ComplexProgramTarget(xmotd)
InstallAppDefaults(XMotd)

#ifdef HAVE_HTML
MakefileSubdirs($(HTML_SUB_DIR))

NormalLibraryObjectRule()
	NamedTargetSubdirs(htmlw, $(HTML_SUB_DIR), , , )
#endif

distrib: $(MANIFEST)
	./distrib

lite: $(MANIFEST)
	./distrib lite

XCOMM Generate man-page
man: xmotd.8
	rm -f xmotd-man.ps;
	troff -mansun xmotd.8 |dpost >xmotd-mansun.ps

XCOMM This target builds the java distribution, Wed Sep 26 19:24:51 2001
java-distrib:
	tar zcvf jmotd-0.55.tar.gz jmotd/README jmotd/logo.gif jmotd/xmotd* jmotd/HistoryItem*
