]> git.zerfleddert.de Git - micropolis/blob - src/tclx/src/makefile
Import Micropolis from http://www.donhopkins.com/home/micropolis/
[micropolis] / src / tclx / src / makefile
1 #
2 # Makefile --
3 #
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.
7 #
8 #------------------------------------------------------------------------------
9 # Copyright 1992 Karl Lehenbauer and Mark Diekhans.
10 #
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
16 # implied warranty.
17 #------------------------------------------------------------------------------
18 # $Id: Makefile,v 2.0 1992/10/16 04:51:22 markd Rel $
19 #------------------------------------------------------------------------------
20 #
21
22 include ../config.mk
23 include ../config/$(TCL_CONFIG_FILE)
24 SHELL=/bin/sh
25
26 #------------------------------------------------------------------------------
27
28 CFLAGS= $(OPTIMIZE_FLAG) $(XCFLAGS) -I../$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) \
29 $(SYS_DEP_FLAGS)
30
31 #------------------------------------------------------------------------------
32
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
41
42 #------------------------------------------------------------------------------
43
44 all: made.tmp ../tcl
45
46 made.tmp: $(OBJS) $(CPLUSOBJS)
47 $(AR) cr ../libtcl.a $(OBJS) $(CPLUSOBJS)
48 touch made.tmp
49
50 tclxstup.o: patchlvl.h tclxstup.c
51 $(CC) -c $(CFLAGS) -DTCL_DEFAULT=\"$(TCL_DEFAULT)\" tclxstup.c
52
53 main.o: patchlvl.h main.c
54 $(CC) -c $(CFLAGS) $(HISTORY_FLAG) main.c
55
56 tclxgdat.c: tclxgdat.y
57 $(YACC) tclxgdat.y
58 mv y.tab.c tclxgdat.c
59
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 \
64 strip ../tcl; \
65 $(MCS_CMD) ../tcl; fi
66
67
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.
72
73 tclplus.o: tclplus.c tclplus.h
74 $(CCPLUS) -c -I $(CCPLUSINCL) $(CFLAGS) $(HISTORY_FLAG) tclplus.cc
75
76 #------------------------------------------------------------------------------
77 # This is just to test if it compiles.
78
79 tclplus: ../tclplus
80
81 ../tclplus: mainplus.o
82 $(CCPLUS) $(CFLAGS) main++.o ../libtcl.a $(LIBS) $(XLDFLAGS) \
83 -o ../tcl++
84
85 mainplus.o: tclplus.h mainplus.c
86 $(CCPLUS) -c -I /usr/include/CC $(CFLAGS) $(HISTORY_FLAG) mainplus.C
87
88
89 #------------------------------------------------------------------------------
90
91 clean:
92 touch junk~
93 -rm -f made.tmp tclxgdat.c
94 -rm -f *~ *.o ../tcl ../tclplus
95
Impressum, Datenschutz