File: makefile

package info (click to toggle)
wbd 1.0ucl4-7
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 296 kB
  • ctags: 476
  • sloc: ansic: 4,131; tcl: 1,663; makefile: 91
file content (91 lines) | stat: -rw-r--r-- 2,593 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
YACC = byacc
LEX = flex -I -i

YFLAGS		= -dv
CFLAGS		= -O2 -pipe $(LIBFLAGS) $(IFLAGS) -DSTAND_ALONE -DUSE_NON_CONST
LIBDIR		= /usr/lib
INCDIR		= /usr/include

# The files needed from the tcl/tk library directories...
LIBRARY_TK	= /usr/share/tcltk/tk8.4
LIBRARY_TCL	= /usr/share/tcltk/tcl8.4


# Uncomment these lines for SGI (IRIX 5.3).
#CC		= cc -DSGI_NAP
#LIBFLAGS	= -L$(LIBDIR)
#IFLAGS		= -I$(INCDIR)
#LIBS		= -ll -ltk4.2 -ltcl7.6 -lm -lX11
# This line is for Wacom support. Needs a hacked libtk.
#LIBS		= -ll -lptk4.2 -ltcl7.6 -lm -lX11 -lXi -lXext

# Uncomment these lines for Linux (RedHat 4.2, 2.0.30).
CC		= gcc
LIBFLAGS	= -L$(LIBDIR) -L/usr/X11R6/lib
IFLAGS		= -I$(INCDIR) -I/usr/X11R6/include -I/usr/include/tcl8.4
LIBS		= -ltk8.4 -ltcl8.4 -lm -lX11 -ldl

# Uncomment these lines for Sun (SunOS 4.1.4).
#CC		= gcc -DHAVE_SYS_TIME_H -DBYTE_ORDER=4321 -ansi
#LIBFLAGS	= -L$(LIBDIR)
#IFLAGS		= -I$(INCDIR)
#LIBS		= -ll -ltk4.2 -ltcl7.6 -lm -lX11

# Uncomment these lines for Sun (SunOS 5.5.1).
#CC		= gcc -DFNDELAY=O_NDELAY -DBYTE_ORDER=4321 -ansi
#LIBFLAGS	= -L$(LIBDIR) -L/usr/openwin/lib
#IFLAGS		= -I$(INCDIR) -I/usr/openwin/include
#LIBS		= -ll -ltk4.2 -ltcl7.6 -lm -lX11 -lsocket -lnsl -ldl

# Uncomment these lines for NetBSD 1.2.
#CC              = cc -ansi
#LIBFLAGS        = -L$(LIBDIR)
#IFLAGS          = -I$(INCDIR)
#LIBS            = -ll -ltk4.2 -ltcl7.6 -lm -lX11

# Tcl initialisation files to be compiled into a C string.
# Needed to remove this:	$(LIBRARY_TK)/tk.tcl
TCL_FILES = \
	$(LIBRARY_TCL)/init.tcl \
	$(LIBRARY_TK)/bgerror.tcl \
	$(LIBRARY_TK)/button.tcl \
	$(LIBRARY_TK)/clrpick.tcl \
	$(LIBRARY_TK)/comdlg.tcl \
	$(LIBRARY_TK)/dialog.tcl \
	$(LIBRARY_TK)/entry.tcl \
	$(LIBRARY_TK)/focus.tcl \
	$(LIBRARY_TK)/listbox.tcl \
	$(LIBRARY_TK)/menu.tcl \
	$(LIBRARY_TK)/palette.tcl \
	$(LIBRARY_TK)/scale.tcl \
	$(LIBRARY_TK)/tearoff.tcl \
	$(LIBRARY_TK)/text.tcl \
	$(LIBRARY_TK)/optMenu.tcl \
	$(LIBRARY_TK)/scrlbar.tcl \
	$(LIBRARY_TK)/tkfbox.tcl \
	$(LIBRARY_TK)/xmfbox.tcl \
	$(LIBRARY_TK)/msgbox.tcl \
	wbdxbm.tcl \
	wbddlg.tcl \
	wbd.tcl

# The Make rules.
INC	= wb.h db.h
SRC	= main.c comms.c db.c wbd.tcl
OBJ	= main.o comms.o db.o tcllibs.o

wbd	:	$(OBJ) $(INC)
	$(CC) $(CFLAGS) $(OBJ) $(LIBS) -o wbd

clean	:
	rm -f *.o tcl2c wbd core

# tcl2c comes from Ron Frederick's (Xerox) nv distribution.
tcl2c	:	tcl2c.o
	$(CC) $(CFLAGS) tcl2c.o $(LIBS) -o tcl2c

# Tcl library files are turned into a single object file.
tcllibs.o: $(TCL_FILES) tcl2c
	rm -f $@ tcllibs.c; \
	./tcl2c 1 $(TCL_FILES) > tcllibs.c ; \
	$(CC) -c $(CFLAGS) tcllibs.c ; rm -f tcllibs.c