File: Makefile

package info (click to toggle)
tkmail 4.0beta9-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,340 kB
  • ctags: 968
  • sloc: tcl: 13,256; ansic: 6,980; makefile: 349; sh: 79; sed: 57
file content (184 lines) | stat: -rw-r--r-- 6,578 bytes parent folder | download | duplicates (2)
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
# Generated automatically from Makefile.in by configure.
# Makefile for TkMail4.0's mfv package
# 
# You should not need to edit this. Edit ../Config.mk instead
#

SHELL = /bin/sh

#----------------------------------------------------------------------
# Basic compiler and installation (as found by configure script)

# 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.

prefix =                /usr
exec_prefix =           ${prefix}

# A "-I" switch that can be used when compiling to make all of the
# X11 include files accessible (the configure script will try to
# set this value, and will cause it to be an empty string if the
# include files are accessible via /usr/include).
X11_INCLUDES =          -I/usr/X11R6/include

# Linker switch(es) to use to link with the X11 library archive (the
# configure script will try to set this value automatically, but you
# can override it).
X11_LIB_SWITCHES =      -L/usr/X11R6/lib -lX11

# Libraries to use when linking:  must include at least Tk, Tcl, Xlib,
# and the math library (in that order).  The "LIBS" part will be
# replaced (or has already been replaced) with relevant libraries as
# determined by the configure script.
LIBS = $(TKX_LIB) $(TK_LIB) $(TCLX_LIB) $(TCL_LIB) \
	$(X11_LIB_SWITCHES)  -lieee -lm


#----------------------------------------------------------------
# The symbols below provide support for dynamic loading and shared
# libraries.  The values of the symbols are normally set by the
# configure script.  You shouldn't normally need to modify any of
# these definitions by hand.  However, you can reverse the comments
# on the pairs of lines to force "no dynamic loading or shared
# libraries".
#----------------------------------------------------------------

# Flags to pass to cc when compiling the components of a shared
# library:
SHLIB_CFLAGS = -fpic
#SHLIB_CFLAGS =

# Base command to use for combining object files into a shared
# library:
SHLIB_LD = cc -shared

# Suffix to use for the name of the shared library.  An empty string
# means we don't know how to use shared libraries on this platform.
SHLIB_SUFFIX = .so
#SHLIB_SUFFIX = .a

# Library file(s) to include in tclsh and other base applications
# in order to provide facilities needed by DLOBJ above.
DL_LIBS = -ldl
#DL_LIBS =

# Flags to pass to the compiler when linking object files into
# an executable tclsh or tcltest binary.
LD_FLAGS = -rdynamic
#LD_FLAGS =

#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in.  You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------

AC_FLAGS =               -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_NETDB_H=1 -DRETSIGTYPE=void -DHAVE_STRERROR=1 -DHAVE_SIGACTION=1 -DHAVE_UNAME=1 -DHAVE_GETHOSTNAME=1 -DHAVE_TEMPNAM=1 -DHAVE_TIMELOCAL=1 -DHAVE_TIMEGM=1 -DHAVE_LOCKF=1 -DHAVE_FLOCK=1 -DHAVE_GETHOSTBYNAME=1 
SRC_DIR =               .
TOP_DIR =               ./..
CC =            	cc
INSTALL = 		$(TOP_DIR)/install-sh -c
INSTALL_PROGRAM =       ${INSTALL}
INSTALL_DATA =          ${INSTALL} -m 644

#------------------------------------------------------------------------------
# Include user-editable defines.
#------------------------------------------------------------------------------

include ${TOP_DIR}/Config.mk

#----------------------------------------------------------------
# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------

MFV_VERSION = 0.8

CC_SWITCHES =   $(CFLAGS) $(TCL_INC) $(TK_INC) $(TCLX_INC) \
	$(X11_INCLUDES) $(AC_FLAGS)

SRC = mfv.c tkAppInit.c tclXsignal.c tclXutil.c \
	tclExtdInt.h tclXconf.h dotlock.c regtest.c
SUPPORT = ChangeLog Makefile.in README 

VERSIONSTR = -DVERSIONSTR=\"$(MFV_VERSION)\"
DOTLOCK = -DDOTLOCK=\"$(BIN_DIR)/dotlock\"
TMPDIRPATH = -DTMPDIRPATH=\"$(TMPDIR)\"

PROGPATHS = $(SPOOL) $(DOTLOCK) $(TMPDIRPATH) $(VERSIONSTR)

OBJS = mfv.o tkAppInit.o $(TCLX_OBJS)

all: mfv_wish dotlock

mfv_wish: $(OBJS)
	$(CC) -o mfv_wish $(CC_SWITCHES) $(OBJS) $(LIBS) $(DL_LIBS)

mfv.o: mfv.c
	$(CC) -c $(CC_SWITCHES) $(PROGPATHS) mfv.c

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

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

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

dload: mfv$(SHLIB_SUFFIX)

# Not very clean as it alway rebuilds everything
mfv$(SHLIB_SUFFIX): mfv.c $(TCLX_SRCS)
	if [ "${HAVE_TCLX}" = "" ] ; then \
	   $(CC) $(CC_SWITCHES) $(SHLIB_CFLAGS) -c tclXsignal.c -o tclXsignal.o; \
	   $(CC) $(CC_SWITCHES) $(SHLIB_CFLAGS) -c tclXutil.c -o tclXutil.o; \
	fi
	$(CC) $(CC_SWITCHES) $(SHLIB_CFLAGS) $(PROGPATHS) -c mfv.c -o mfv.o
	$(SHLIB_LD) mfv.o $(TCLX_OBJS) -o mfv$(SHLIB_SUFFIX)

dotlock: dotlock.c
	$(CC) -o dotlock $(CC_SWITCHES) $(SPOOL) dotlock.c

regtest: regtest.o tkAppInit.o
	$(CC) -o regtest $(CC_SWITCHES) regtest.o tkAppInit.o $(LIBS)

clean:
	rm -rf regtest dotlock mfv_wish mfv.so core *.o

distclean: clean
	rm -rf Makefile

tar:
	rm -f mfv*.tar.g*[zZ]*
	mkdir mfv-$(VERSION)
	cp -r $(SRC) $(SUPPORT) mfv-$(VERSION)
	tar chvf mfv-$(VERSION).tar mfv-$(VERSION)
	gzip mfv-$(VERSION).tar
	rm -rf mfv-$(VERSION)
	@echo "*** Did you remember to cvs commit first?"

install:
	@if [ -d $(BIN_INSTALL_DIR) ]; then \
	  rm -rf $(BIN_INSTALL_DIR)/mfv_wish;  \
	  rm -rf $(BIN_INSTALL_DIR)/dotlock;  \
	else (set -x; mkdir $(BIN_INSTALL_DIR)); fi
	$(INSTALL_PROGRAM) mfv_wish $(BIN_INSTALL_DIR)
	$(INSTALL_PROGRAM) dotlock $(BIN_INSTALL_DIR)
	@echo "Installation is not complete. If users cannot create files"; \
	echo "in the mail spool directory, you will need to modify the"; \
	echo "dotlock program to be setgid for the same group as the mail"; \
	echo "spool directory. If the group cannot write to the mail spool"; \
	echo "directory, dotlock will need to be setuid to the owner."; \
	echo "Example:";\
	echo "    chown root.mail $(BIN_INSTALL_DIR)/dotlock"; \
	echo "    chmod g+s $(BIN_INSTALL_DIR)/dotlock"; \
	echo " or chmod u+s $(BIN_INSTALL_DIR)/dotlock"; \
	echo ""