]> cvs.zerfleddert.de Git - micropolis/blob - src/tk/makefile.linux
encapsulate sdl_mixer stuff in #ifdef WITH_SDL_MIXER
[micropolis] / src / tk / makefile.linux
1 #
2 # This is a simplified Makefile for use in Tk distributions. Before using
3 # it to compile Tk, you may wish to reset some of the following variables:
4 #
5 # TCL_DIR - Name of directory holding tcl.h and tcl.a.
6 # XLIB - Name of archive containing Xlib binaries.
7 #
8
9 # You may also wish to add some of the following switches to the CFLAGS
10 # variable:
11 #
12 # -DX11R3 Causes code that depends on R4 facilities not to
13 # be compiled. I haven't tested Tk with R3 in quite
14 # a while, so this switch may not be enough to
15 # generate a working R3 version of Tk. Furthermore,
16 # use of this switch will disable some of the facilities
17 # of Tk related to window managers.
18 # -DNO_PROTOTYPE Turns off ANSI-style procedure prototypes and the
19 # corresponding compile-time checks. Without this
20 # defininition, prototypes will be turned on if the
21 # compiler supports ANSI C by defining __STDC__.
22 # -DTK_LIBRARY=\"dir\" Arranges for dir, which must be the name of a
23 # directory, to be the library directory for Tk scripts.
24 # This value gets put into the variable $tk_library
25 # when a new application is created. The library
26 # defaults to /usr/local/lib/tk, so you don't need the
27 # switch unless your library is in a non-standard place.
28 #
29
30 CC = gcc
31 #CFLAGS = -I/usr/openwin/include -I. -I$(TCL_DIR) -O2 -DTK_VERSION=\"2.3\" -DUSE_XPM3 -I$(XPM_DIR)
32 CFLAGS = -I/usr/openwin/include -I. -I$(TCL_DIR) -O -DTK_VERSION=\"2.3\" -DUSE_XPM3 -I$(XPM_DIR)
33
34 #CC = gcc
35 #CFLAGS = -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.3\" -DUSE_XPM3 -I$(XPM_DIR)
36
37 TCL_DIR = ../tcl
38 XPM_DIR = ../xpm
39 XLIB = -lX11
40
41 #LIBS = libtk.a $(TCL_DIR)/libtcl.a $(XPM_DIR)/libxpm.a
42 LIBS = libtk.a $(TCL_DIR)/libtcl.a $(XPM_DIR)/libxpm.a
43 #LINKS = $(LIBS) -lsocket -lnsl
44 LINKS = $(LIBS)
45
46 WIDGOBJS = tkbutton.o tkentry.o tkframe.o tklist.o \
47 tkmenu.o tkmnbut.o tkmsg.o tkscale.o \
48 tkscrbar.o
49
50 CANVOBJS = tkcanvas.o tkcvarc.o tkcvbmap.o tkcvline.o \
51 tkcvpoly.o tkcvtext.o tkcvwind.o tkrectov.o \
52 tktrig.o
53
54 TEXTOBJS = tktext.o tktxbtre.o tktxdisp.o tktxidx.o tktxtag.o
55
56 OBJS = tk3d.o tkargv.o tkatom.o tkbind.o tkbitmap.o \
57 tkcmds.o tkcolor.o tkconfig.o tkcursor.o tkerror.o \
58 tkevent.o tkfont.o tkget.o tkgc.o tkgeo.o tkgrab.o \
59 tkoption.o tkpack.o tkpixmap.o tkplace.o tkpresrv.o \
60 tkselect.o tksend.o tkshare.o tkwindow.o tkwm.o tkrawtcp.o \
61 $(WIDGOBJS) $(CANVOBJS) $(TEXTOBJS)
62
63 WIDGSRCS = tkbutton.c tkentry.c tkframe.c tklist.c \
64 tkmenu.c tkmnbut.c tkmessage.c tkscale.c \
65 tkscrbar.c tktext.c tktxbtre.c tktxdisp.c \
66 tktextindex.c
67
68 CANVSRCS = tkcanvas.c tkcvarc.c tkcvbmap.c tkcvline.c \
69 tkcvpoly.c tkcvtext.c tkcvwind.c tkrectov.c \
70 tktrig.c
71
72 TEXTSRCS = tktext.c tktxbtre.c tktxdisp.c tktxidx.c tktxtag.c
73
74 SRCS = tk3d.c tkargv.c tkatom.c tkbind.c tkbitmap.c \
75 tkcmds.c tkcolor.c tkconfig.c tkcursor.c tkerror.c \
76 tkevent.c tkfont.c tkget.c tkgc.c tkgeo.c tkgrab.c \
77 tkoption.c tkpack.c tkplace.c tkpresrv.c tkselect.c \
78 tksend.c tkshare.c tkwindow.c tkwm.c tkrawtcp.c $(widgsrcs) \
79 $(CANVSRCS) $(TEXTSRCS)
80
81 all: wish
82
83 wish: main.o $(LIBS)
84 $(CC) $(CFLAGS) main.o $(LINKS) $(XLIB) -lm -o wish
85
86 libtk.a: $(OBJS)
87 rm -f libtk.a
88 ar cr libtk.a $(OBJS)
89 ranlib libtk.a
90
91 $(TCL_DIR)/libtcl.a:
92 cd $(TCL_DIR); make libtcl.a
93
94 clean:
95 touch junk~
96 rm -f $(OBJS) main.o libtk.a wish *~
97
98 $(OBJS): tk.h tkint.h tkconfig.h
99 $(WIDGOBJS): default.h
100 $(CANVOBJS): default.h tkcanvas.h
101 main.o: tk.h tkint.h
Impressum, Datenschutz