4 # Makefile for building special version of tk source to support Extended Tcl.
 
   6 #------------------------------------------------------------------------------
 
   7 # Copyright 1992 Karl Lehenbauer and Mark Diekhans.
 
   9 # Permission to use, copy, modify, and distribute this software and its
 
  10 # documentation for any purpose and without fee is hereby granted, provided
 
  11 # that the above copyright notice appear in all copies.  Karl Lehenbauer and
 
  12 # Mark Diekhans make no representations about the suitability of this
 
  13 # software for any purpose.  It is provided "as is" without express or
 
  15 #------------------------------------------------------------------------------
 
  16 # $Id: Makefile,v 2.0 1992/10/16 04:54:52 markd Rel $
 
  17 #------------------------------------------------------------------------------
 
  21 include ../config/$(TCL_CONFIG_FILE)
 
  24 #------------------------------------------------------------------------------
 
  26 CFLAGS= $(OPTIMIZE_FLAG) $(XCFLAGS) -I../src -I../$(TCL_TK_DIR) \
 
  27         -I../$(TCL_UCB_DIR) -I$(XHOME)/include \
 
  28         $(MEM_DEBUG_FLAGS) $(SYS_DEP_FLAGS) \
 
  31 #------------------------------------------------------------------------------
 
  36 OBJS      = main.o $(LIBOBJS)
 
  37 WISHX_TCL = ../tcllib/wishx.tcl
 
  38 TK_TCL    = ../tcllib/tk.tcl
 
  39 TK_TLIB   = ../tcllib/tk.tlib
 
  41 #------------------------------------------------------------------------------
 
  43 # Original UCB Sources to build them from:
 
  45 MAIN_SRC  = ../$(TCL_TK_DIR)/main.c
 
  46 EVENT_SRC = ../$(TCL_TK_DIR)/tkevent.c
 
  47 WISHX_SRC = ../$(TCL_TK_DIR)/library/wish.tcl
 
  48 TK_TCL_SRC= ../$(TCL_TK_DIR)/library/tk.tcl
 
  50 #------------------------------------------------------------------------------
 
  52 #all: made.tmp $(WISHX_TCL) $(TK_TLIB) $(TK_TCL)
 
  53 all: made.tmp $(WISHX_TCL) $(TK_TCL)
 
  56         -$(AR) d ../libtk.a $(LIBOBJS)
 
  57         $(AR) cr ../libtk.a $(LIBOBJS)
 
  60 main.c: $(MAIN_SRC) main.sed
 
  62         sed -f main.sed <$(MAIN_SRC) >main.c
 
  64 tkevent.c: $(EVENT_SRC) tkevent.sed
 
  66         sed -f tkevent.sed <$(EVENT_SRC) >tkevent.c
 
  68 $(WISHX_TCL): $(WISHX_SRC) wishx.sed
 
  70         sed -f wishx.sed <$(WISHX_SRC) >$(WISHX_TCL)
 
  72 $(TK_TCL): $(TK_TCL_SRC)
 
  74         cp $(TK_TCL_SRC) $(TK_TCL)
 
  76 $(TK_TLIB): ../$(TCL_TK_DIR)/library/tclindex
 
  77         TCLDEFAULT=../tcldef;export TCLDEFAULT ;\
 
  78         ../tcl "-c convert_lib ../$(TCL_TK_DIR)/library/tclindex $(TK_TLIB)"
 
  80 #------------------------------------------------------------------------------
 
  84         rm -f *~ $(OBJS) made.tmp
 
  85         rm -f tkevent.c main.c
 
  86         rm -f $(WISHX_TCL) $(TK_TCL) $(TK_TLIB) ../tcllib/tk.tdx