File: Makefile.in

package info (click to toggle)
floater 1.2b1-6
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 1,612 kB
  • ctags: 1,822
  • sloc: ansic: 16,755; tcl: 4,034; sh: 1,291; makefile: 129
file content (184 lines) | stat: -rw-r--r-- 6,121 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# This file is a Makefile for Floater.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own site
# are in the section that follows.  It is recommended that you modify
# Makefile.in rather than Makefile.  Then do "make Makefile".
#----------------------------------------------------------------

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such as
# scripts (prefix).  The values specified here may be overridden at
# configure-time with the --exec-prefix and --prefix options to the
# "configure" script.

# Note that if you do not plan to ever do "make install," you should
# probably leave exec_prefix and prefix set to the directory containing
# the Floater source files.

#exec_prefix =   /usr/local
#prefix =        /usr/local
exec_prefix =	@srcdir@
prefix =	@srcdir@

# This is a hack to help people who are confused about how to set the
# FLOATER_LIBRARY variable.  If you set that correctly it is entirely
# unnecessary.  If it causes problems, switch the comment characters
# on the two lines (so that SRC_DIR_DEFN is defined to be the empty string).
SRC_DIR_DEFN = `pwd`
#SRC_DIR_DEFN =

FLOATER_LIBRARY =	$(prefix)/tclcode

# Directory in which to install the program floater and floatert:
BIN_DIR =	$(exec_prefix)/bin

# Some Floater-specific switches and their meaning:
#
#   TCL_IN_C: If true, instead of reading the Tcl files that are part of
#	Floater at run time, they are formatted into C and compiled.
#	Just a matter of convenience.  Remove floatcl.o from FLOBS, below,
#	if you set TCL_IN_C to 0.  (Note: floatcl.c crashes some lousy
#	compilers, such as one by Microsoft.)
#   USER_TCL: If true, users can execute Tcl commands (by doing "tcl ...").
SWITCHES = -DTCL_IN_C=1 -DUSER_TCL=1

# To change the compiler switches, change the following line:
#CFLAGS = -O
CFLAGS = -O -g
LDFLAGS = -g

#------------------------------------------------------------
# The options below this line are set automatically by the
# configure script so you should not edit them manually or
# your changes may be destroyed the next time the configure
# script is run.
#------------------------------------------------------------

# Where to find Tcl/Tk
TCL_INCLUDES = @TCL_INCLUDES@
TCL_LIB = @TCL_LIB@
TK_INCLUDES = @TK_INCLUDES@
TK_LIB = @TK_LIB@

# Where to find [n]curses
CURSES_INCLUDES = @CURSES_INCLUDES@
CURSES_LIB = @CURSES_LIB@

# Where to find X11
X11_INCLUDES = @X_INCLUDES@
X11_LIB = @X_LIB@

EXTRA_LIBS = @LIBS@

#------------------------------------------------------------
# You should not need to modify anything beyond this point
#------------------------------------------------------------

INCLUDES = $(CURSES_INCLUDES) $(TCL_INCLUDES) $(TK_INCLUDES) \
	$(X11_INCLUDES) -I@srcdir@
LIBS = $(TK_LIB) $(TCL_LIB) $(X11_LIB) $(CURSES_LIB) \
	$(EXTRA_LIBS) -lm

# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands.  We also use it
# for executing config.status to remake the Makefile.
SHELL =		/bin/sh

CC =		@CC@
CPP =		gcc -x c -E
CPP_SWITCHES =
#CPP_SWITCHES =	-DDEBUG
DEPEND =	gcc -M
CC_SWITCHES = $(CFLAGS) $(SWITCHES) @DEFS@ $(INCLUDES) \
	-DFLOATER_LIBRARY=\"$(FLOATER_LIBRARY)\" \
	-DSRC_DIR=\"$(SRC_DIR_DEFN)\"

INSTALL =		@INSTALL@
INSTALL_PROGRAM =	@INSTALL_PROGRAM@
INSTALL_DATA =		@INSTALL_DATA@

#------------------------------------------------------------
# Rules to build floater
#------------------------------------------------------------

# If you want to have Floater read floater.tcl etc. at run time, you may
# remove floatcl.o from FLOBS. (Make sure you have also removed -DTCL_IN_C=1
# from SWITCHES.)
FLOBS = tickler.o main.o commandhash.o alloc.o floatcmd.o \
	comm.o rand.o deal.o stringlist.o br.o UI.o bits.o util.o result.o \
	score.o calendar.o help.o autohelp.o bug.o text.o floatcl.o
HEADERS = alloc.h comm.h commandhash.h deal.h debug.h floatcmd.h floater.h \
	message.h rand.h stringlist.h tickler.h br.h UI.h bits.h util.h \
	result.h score.h calendar.h help.h bug.h heartsrules.h text.h
TCL_IN_C_FILES = tclcode/floater.tcl tclcode/floatert.tcl

.SUFFIXES: .TCL .tcl .deq .tar .tgz

.tar.tgz:
	gzip --best --to-stdout $< > $@

.TCL.tcl:
	$(CPP) $(CPP_SWITCHES) $< | sed -f requote > $@

.TCL.deq:
	sed -f dequote $< > $@

all: floater tclcode/floater.tcl tclcode/floatert.tcl

floatcl.c: tcl2c floatcl1.c floatcl2.c $(TCL_IN_C_FILES)
	tclsh tcl2c $(TCL_IN_C_FILES)

autohelp.c: autohelp1.c autohelp2.c autohelp3.c ref
	-rm -f autohelp.c
	cp autohelp1.c autohelp.c
	sed 's/"/\\"/g' ref | sed 's/\(.*\)/\"\1\\n\"/g' >> autohelp.c
	cat autohelp2.c >> autohelp.c
	echo -n \" >> autohelp.c
	grep "	" ref | tr "\012" " " | tr -d "\011" >> autohelp.c
	echo -n \" >> autohelp.c
	cat autohelp3.c >> autohelp.c

floater: $(FLOBS)
	$(CC) $(LDFLAGS) $(FLOBS) $(LIBS) -o $@

Makefile: @srcdir@/Makefile.in
	$(SHELL) config.status

clean:
	rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors floater floaterp

distclean: clean
	rm -f Makefile config.cache config.log config.status

.c.o:
	$(CC) -c $(CC_SWITCHES) $<

depend:
	-rm -f depend.inc depend2.inc
	echo -n "tclcode/floater.tcl: " > depend2.inc
	for i in tclcode/*.TCL ; \
	    do \
	    (echo -n " $$i " ; \
	     echo -n $$i | sed s/TCL/deq/ ) >> depend2.inc ; \
	    done;
	echo "" >> depend2.inc
	echo "" >> depend2.inc
	echo "tclcode/floatert.tcl: tclcode/floater.tcl" >> depend2.inc
	-csh -c "$(DEPEND) *.c > depend.inc"

#depend:
#	-rm -f depend.inc depend2.inc
#	echo -n "tclcode/floater.tcl: " > depend2.inc
#	echo tclcode/*.TCL >> depend2.inc
#	echo -n "tclcode/floatert.tcl: " >> depend2.inc
#	echo tclcode/*.TCL >> depend2.inc
#	-csh -c "$(DEPEND) *.c > depend.inc"

include depend.inc
include depend2.inc