4 # Makefile for Extended Tcl C sources. This will compile all of Extended Tcl
5 # and add it to the libtcl.a in the parent directory. Generates a Tcl shell
6 # in the parent directory.
8 #------------------------------------------------------------------------------
9 # Copyright 1992 Karl Lehenbauer and Mark Diekhans.
11 # Permission to use, copy, modify, and distribute this software and its
12 # documentation for any purpose and without fee is hereby granted, provided
13 # that the above copyright notice appear in all copies. Karl Lehenbauer and
14 # Mark Diekhans make no representations about the suitability of this
15 # software for any purpose. It is provided "as is" without express or
17 #------------------------------------------------------------------------------
18 # $Id: Makefile,v 2.0 1992/10/16 04:51:22 markd Rel $
19 #------------------------------------------------------------------------------
23 include ../config/$(TCL_CONFIG_FILE)
26 #------------------------------------------------------------------------------
28 CFLAGS= $(OPTIMIZE_FLAG) $(XCFLAGS) -I../$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) \
31 #------------------------------------------------------------------------------
33 OBJS= main.o tclxbsrc.o tclxcclk.o tclxchmd.o \
34 tclxclck.o tclxclp.o tclxcret.o tclxdebg.o \
35 tclxdup.o tclxfcmd.o tclxfctl.o tclxfmat.o \
36 tclxfsca.o tclxgdat.o tclxgenl.o tclxhndl.o \
37 tclxid.o tclxklst.o tclxlib.o tclxlist.o \
38 tclxmath.o tclxmerr.o tclxmsgc.o tclxproc.o \
39 tclxprof.o tclxrexp.o tclxsel.o tclxsig.o \
40 tclxstr.o tclxstup.o tclxunix.o tclxutil.o
42 #------------------------------------------------------------------------------
46 made.tmp: $(OBJS) $(CPLUSOBJS)
47 $(AR) cr ../libtcl.a $(OBJS) $(CPLUSOBJS)
50 tclxstup.o: patchlvl.h tclxstup.c
51 $(CC) -c $(CFLAGS) -DTCL_DEFAULT=\"$(TCL_DEFAULT)\" tclxstup.c
53 main.o: patchlvl.h main.c
54 $(CC) -c $(CFLAGS) $(HISTORY_FLAG) main.c
56 tclxgdat.c: tclxgdat.y
60 ../tcl: ../libtcl.a made.tmp
61 $(RANLIB_CMD) ../libtcl.a
62 $(CC) $(CFLAGS) main.o ../libtcl.a $(LIBS) $(XLDFLAGS) -o ../tcl
63 if $(DO_STRIPPING) ; then \
68 #------------------------------------------------------------------------------
69 # This is a painful situation. The file tcl++.h requires string.h, which is
70 # redefined in the UCB Tcl directory. We force the compiler to search the
71 # C++ directories first.
73 tclplus.o: tclplus.c tclplus.h
74 $(CCPLUS) -c -I $(CCPLUSINCL) $(CFLAGS) $(HISTORY_FLAG) tclplus.cc
76 #------------------------------------------------------------------------------
77 # This is just to test if it compiles.
81 ../tclplus: mainplus.o
82 $(CCPLUS) $(CFLAGS) main++.o ../libtcl.a $(LIBS) $(XLDFLAGS) \
85 mainplus.o: tclplus.h mainplus.c
86 $(CCPLUS) -c -I /usr/include/CC $(CFLAGS) $(HISTORY_FLAG) mainplus.C
89 #------------------------------------------------------------------------------
93 -rm -f made.tmp tclxgdat.c
94 -rm -f *~ *.o ../tcl ../tclplus