File: Makefile

package info (click to toggle)
ts 9802-1
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 2,348 kB
  • ctags: 1,468
  • sloc: tcl: 4,567; ansic: 3,389; makefile: 88; sh: 1
file content (146 lines) | stat: -rw-r--r-- 4,277 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
##############################################################################
# Compiling options
##############################################################################
#
# 1) Path of tcl/tk start-up scripts (depending on version and tcl installation)
#
# Modify the following macros to give them values suitable for your
# site, then type "make".
#
# Change the following macro to identify the directories on the host system
# which contain the Tcl/Tk start-up scripts.  To find these directories,
# type:
#      echo 'puts $auto_path; destroy .' >temp; wish -f temp; rm temp
#
TCL_LIB_INC = -I/usr/lib/tcl8.0 -I/usr/lib/tk8.0
#TCL_LIB_INC = -I/usr/lib/tcl7.4 -I/usr/X11R6/lib/tk4.0
#
##########################################################################
#
# 2) Path of C header files tcl.h and tk.h (depending on tcl installation)
#
# Change the following macro to identify the directories on the host system
# which contain the Tcl/Tk source code header files, tcl.h tclInt.h tk.h
# tkInt.h and so forth.  This is normally the same directory in which the
# source code to Tcl/Tk was originally unpacked.
#
TCL_HDR_INC = -I/usr/include
#TCL_HDR_INC = -I/usr/include/tcl
#
###########################################################################
#
# 3) Path of tcl/tk libraries (depending on version and tcl installation)
#
# Change the following macro to contain the sequence of library files
# which must be linked into any Tcl/Tk program.  This is normally the
# same on all systems.
# tcl7.5/7.6 needs the libdl library!
#
  LIB = -L/usr/lib -L/usr/X11R6/lib -ltk8.0 -ltcl8.0 -lX11 -ldl -lm
#  LIB = -L/usr/X11R6/lib -ltk4.0 -ltcl7.4 -lX11 -lm
#
############################################################################
#
# 4) Name of the et source (depending on version)
#
  ET_SRC = et80.c
#
#############################################################################
#
# 5) C compiler options
#
# Change the following macros to describe the C compiler, and options
# to the C compiler for use on the host system.
# Set the macro DEBUG for debugging info.
#
  CC =     gcc
# CFLAGS = -Wall -g -DDEBUG
  CFLAGS = -Wall -O2
# CFLAGS = -O6 -static
# CFLAGS = -O6
#
############################################################################
#
# 6) et2c options
#
# Call for et2c (-dynamic is usefull for debugging, but slower)
#
# ET2C = ./et2c -dynamic
 ET2C = ./et2c
#
######################################################################
# Installation options                                               #
######################################################################
#
# 1) Installation directories for ts
#
# TS_BASE	Base directory for ts
#
# TS_BIN	Installation dir for ts binary

#TS_BASE = /home/jens/ts-9712
#TS_BIN  = /home/jens/ts-9712
TS_BASE = /usr/lib/ts
TS_BIN  = /usr/bin
#
######################################################################
#
# 2) other settings
#
# TS_PARAM      Global parameter file
#
TS_PARAM = /etc/ts.cfg

#
# Do not change anything after this line
#
#############################################

.SUFFIXES: .et .tcl

OBJECTS=ts.o exec.o getpty.o et.o
TCLS=ts_dlg.tcl ts_filedlg.tcl ts_ide.tcl ts_help.tcl ts_param.tcl \
  ts_prtdlg.tcl ts_edit.tcl ts.tcl ts_term.tcl ts_opt.tcl ts_template.tcl \
  ts_prj.tcl

.et.c:
	$(ET2C) $< >$*.c

.c.o:
	$(CC) -c $(CFLAGS) $(TCL_HDR_INC) -DTS_BASE=\"$(TS_BASE)\" $<

all: et2c ts

et2c:   et2c.c
	$(CC) $(CFLAGS) $(TCL_HDR_INC) et2c.c -o $@

et.o:   $(ET_SRC) et2c
	$(ET2C) $(ETKR) $(TCL_LIB_INC) $(ET_SRC) >et_.c
	$(CC) $(CFLAGS) $(TCL_HDR_INC) -c et_.c -o $@
	rm -f et_.c

ts.c: $(TCLS)

ts: $(OBJECTS)
	$(CC) -o ts $(OBJECTS) $(LIB)

install:
	install -d $(TS_BASE)/bitmaps
	install -d $(TS_BASE)/help
	rm -rf $(TS_BASE)/help/*
	install -d $(TS_BASE)/help/ger
	install -d $(TS_BASE)/help/eng
	install -d $(TS_BASE)/templates
	install -c -m 644 *.cfg $(TS_BASE)
	install -c -m 755 ts ts_err $(TS_BIN)
	install -c -m 644 bitmaps/*.ico $(TS_BASE)/bitmaps
	cp -a help/* $(TS_BASE)/help
	chmod 755 $(TS_BASE)/help/eng
	chmod 755 $(TS_BASE)/help/eng/latex
	chmod 755 $(TS_BASE)/help/ger
	chmod 755 $(TS_BASE)/help/ger/latex
	chmod 755 $(TS_BASE)/bitmaps
	install -c -m 644 templates/* $(TS_BASE)/templates

clean:
	rm -f ts et2c *.o *.aux *.log *.dvi core