1# ./Makefile.in			-*- Makefile -*-
2# $Id: Makefile.in,v 1.18 2016/06/28 23:45:01 PST portmaster Exp $
3
4# autoconf/Make.common.in	 -*- Makefile -*-
5# release date (man), LSM date, version number/name, current maintainer
6DATE=28 JUNE 2016
7LSMDATE=28JUN16
8VERSION=3.0.1
9VERNAME=xvt-$(VERSION)#
10MAINT=Chris Hutchinson#
11MAINTEMAIL=<portmaster@BSDforge.com>#
12WEBMAINT=WebDev#
13WEBMAINTEMAIL=<webdev@BSDforge.com>#
14WEBPAGE=<http://BSDforge.com/>#
15FTPSITENAME=ftp.bsdforge.com#
16FTPSITEDIR=/projects/source/x11/xvt#
17#-------------------------------------------------------------------------
18XVTNAME=xvt
19
20SHELL = /bin/sh
21
22# This variable makes it possible to move the installation root to another
23# directory. This is useful when you're creating a binary distribution
24# If empty, normal root will be used.
25# You can run eg. 'make install DESTDIR=/packages/xvt-xx' to accomplish
26# that.
27# DESTDIR = /usr/local/X11/$(VERNAME)
28
29# Installation target directories & other installation stuff
30prefix = /usr/local
31exec_prefix = ${prefix}
32bindir = ${exec_prefix}/bin
33libdir = ${exec_prefix}/lib
34includedir = ${prefix}/include
35mandir = ${prefix}/man/man1
36manext = 1
37
38# Tools & program stuff
39CC = gcc
40CPP = gcc -E
41MV = /bin/mv
42RM = /bin/rm
43RMF = /bin/rm -f
44CP = /bin/cp
45LN = /bin/ln
46SED = /usr/bin/sed
47AWK = awk
48ECHO = /bin/echo
49CMP = /usr/bin/cmp
50TBL = /usr/bin/tbl
51INSTALL = /usr/bin/install -c
52INSTALL_PROGRAM = /usr/bin/install -c -m 755
53INSTALL_DATA = /usr/bin/install -c -m 644
54
55# Flags & libs
56# add -DBINDIR=\""$(bindir)/"\" to CPPFLAGS, if we need to spawn a program
57
58CFLAGS = -g -O2
59CPPFLAGS =
60LDFLAGS =
61DEFS = -DHAVE_CONFIG_H
62LIBS =
63DINCLUDE =
64DLIB =
65
66# X Include directory
67XINC =  -I/usr/X11R6/include
68
69# extra libraries needed by X on some systems, X library location
70XLIB = -L/usr/X11R6/lib -Wl,-rpath -Wl,/usr/X11R6/lib  -lX11
71
72LIBTOOL = $(SHELL) $(top_builddir)/libtool
73COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEBUG) $(DINCLUDE) $(XINC) -I$(basedir) -I$(srcdir) -I.
74LINK = $(CC) $(CFLAGS) $(LDFLAGS)
75
76# End of common section of the Makefile
77#-------------------------------------------------------------------------
78
79srcdir =	.
80
81.PATH:		.
82
83first_rule: all
84dummy:
85
86subdirs = src doc rclock src/graphics src/test
87allsubdirs = W11 $(subdirs)
88
89DIST =	INSTALL README.configure configure Makefile Makefile.in ChangeLog
90
91DIST_CFG = autoconf/aclocal.m4 autoconf/xpm.m4 autoconf/libtool.m4 \
92	autoconf/configure.in  autoconf/config.h.in \
93	autoconf/Make.common.in autoconf/install-sh autoconf/mkinstalldirs \
94	autoconf/config.guess autoconf/config.sub \
95	autoconf/ltmain.sh \
96
97MKDIR = $(srcdir)/autoconf/mkinstalldirs
98
99#-------------------------------------------------------------------------
100
101all allbin alldoc tags:
102	@if test xnetbsdelf1.6Q = xcygwin; then (cd W11; ${MAKE} $@ || exit 1); fi
103	@for I in ${subdirs}; do (cd $$I; ${MAKE} $@ || exit 1); done
104
105realclean: clean
106	$(RMF) config.h config.status config.log libtool
107
108clean:
109	$(RMF) *~ config.cache
110	$(RMF) -r autom4te.cache
111	@if test xnetbsdelf1.6Q = xcygwin; then (cd W11; ${MAKE} $@ || exit 1); fi
112	@for I in ${subdirs}; do (cd $$I; ${MAKE} $@ || exit 1); done
113
114#
115# entry points for other programs
116#
117xvt:
118	(cd src; ${MAKE})
119
120clock:
121	(cd rclock; ${MAKE})
122
123graphics qplot:
124	(cd src/graphics; ${MAKE} qplot)
125
126tests:
127	(cd src/test; ${MAKE} tests)
128
129#-------------------------------------------------------------------------
130configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/config.h.in
131	cd $(srcdir);
132	./.prebuild
133
134config.status:
135	if test -x config.status; then config.status --recheck; \
136	else $(SHELL) configure; fi
137
138autoconf/config.h.in: autoconf/configure.in
139	cd $(srcdir);
140	./.prebuild
141
142installdirs:
143	$(MKDIR) $(DESTDIR)$(bindir)
144	$(MKDIR) $(DESTDIR)$(mandir)
145
146install: installdirs
147	@if test xnetbsdelf1.6Q = xcygwin; then (cd W11; ${MAKE} $@ || exit 1); fi
148	@for I in $(subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
149
150Makefiles:
151	$(SHELL) config.status
152
153cleandir: realclean
154
155# distclean goal is for making a clean source tree, but if you have run
156# configure from a different directory, then doesn't destroy all your
157# hardly compiled and linked stuff. That's why there is always $(srcdir)/
158# In that case most of those commands do nothing, except cleaning *~
159# and cleaning source links.
160distclean:
161	(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status libtool)
162	@for I in $(allsubdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
163	(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
164
165distdirs:
166	mkdir ../$(VERNAME);
167	mkdir ../$(VERNAME)/autoconf;
168	@for I in $(allsubdirs); do (cd $$I; $(MAKE) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
169
170distcopy:
171	$(CP) -p $(DIST) ../$(VERNAME);
172	$(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
173	@for I in $(allsubdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
174
175distrib: configure autoconf/config.h.in distdirs distcopy
176
177tar.xz:  ../$(VERNAME).tar.xz
178../$(VERNAME).tar.xz:
179	(cd ..; tar cvf - $(VERNAME) | xz -9e > $(VERNAME).tar.xz)
180
181tar.gz:  ../$(VERNAME).tar.gz
182../$(VERNAME).tar.gz:
183	(cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
184
185tar.Z: ../$(VERNAME).tar.Z
186../$(VERNAME).tar.Z:
187	(cd ..; tar cvf - $(VERNAME) | compress > $(VERNAME).tar.Z)
188
189tar.bz2: ../$(VERNAME).tar.bz2
190../$(VERNAME).tar.bz2:
191	(cd ..; tar cvf - $(VERNAME) | bzip2 -f9 > $(VERNAME).tar.bz2)
192
193uuencode: tar.gz
194	uuencode ../$(VERNAME).tar.gz $(VERNAME).tar.gz > ../$(VERNAME).tgz.uu
195
196# ------------------------------------------------------------------------
197