1#  Copyright (C) 2001-2006 Artifex Software, Inc.
2#  All Rights Reserved.
3#
4#  This software is provided AS-IS with no warranty, either express or
5#  implied.
6#
7#  This software is distributed under license and may not be copied, modified
8#  or distributed except as expressly authorized under the terms of that
9#  license.  Refer to licensing information at http://www.artifex.com/
10#  or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
11#  San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12#
13# $Id: unix-end.mak 8479 2008-01-07 20:58:40Z giles $
14# Partial makefile common to all Unix and Desqview/X configurations.
15# This is the next-to-last part of the makefile for these configurations.
16
17# Define the rule for building standard configurations.
18STDDIRS:
19	@if test ! -d $(BINDIR); then mkdir $(BINDIR); fi
20	@if test ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi
21	@if test ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi
22	@if test ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi
23	@if test ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi
24
25# Define a rule for building profiling configurations.
26PGDIRS: STDDIRS
27	@if test ! -d $(BINDIR)/$(PGRELDIR); then mkdir $(BINDIR)/$(PGRELDIR); fi
28	@if test ! -d $(GLGENDIR)/$(PGRELDIR); then mkdir $(GLGENDIR)/$(PGRELDIR); fi
29	@if test ! -d $(GLOBJDIR)/$(PGRELDIR); then mkdir $(GLOBJDIR)/$(PGRELDIR); fi
30	@if test ! -d $(PSGENDIR)/$(PGRELDIR); then mkdir $(PSGENDIR)/$(PGRELDIR); fi
31	@if test ! -d $(PSOBJDIR)/$(PGRELDIR); then mkdir $(PSOBJDIR)/$(PGRELDIR); fi
32
33PGDEFS=GENOPT='-DPROFILE' CFLAGS='$(CFLAGS_PROFILE) $(GCFLAGS) $(XCFLAGS)'\
34 LDFLAGS='$(XLDFLAGS) -pg' XLIBS='Xt SM ICE Xext X11'\
35 BINDIR=$(BINDIR)/$(PGRELDIR)\
36 GLGENDIR=$(GLGENDIR)/$(PGRELDIR) GLOBJDIR=$(GLOBJDIR)/$(PGRELDIR)\
37 PSGENDIR=$(PSGENDIR)/$(PGRELDIR) PSOBJDIR=$(PSOBJDIR)/$(PGRELDIR)
38
39pg: PGDIRS
40	$(MAKE) $(PGDEFS) default
41
42pgclean: PGDIRS
43	$(MAKE) $(PGDEFS) clean
44
45# Define a rule for building debugging configurations.
46DEBUGDIRS: STDDIRS
47	@if test ! -d $(BINDIR)/$(DEBUGRELDIR); then mkdir $(BINDIR)/$(DEBUGRELDIR); fi
48	@if test ! -d $(GLGENDIR)/$(DEBUGRELDIR); then mkdir $(GLGENDIR)/$(DEBUGRELDIR); fi
49	@if test ! -d $(GLOBJDIR)/$(DEBUGRELDIR); then mkdir $(GLOBJDIR)/$(DEBUGRELDIR); fi
50	@if test ! -d $(PSGENDIR)/$(DEBUGRELDIR); then mkdir $(PSGENDIR)/$(DEBUGRELDIR); fi
51	@if test ! -d $(PSOBJDIR)/$(DEBUGRELDIR); then mkdir $(PSOBJDIR)/$(DEBUGRELDIR); fi
52
53DEBUGDEFS=GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(GCFLAGS) $(XCFLAGS)'\
54 BINDIR=$(BINDIR)/$(DEBUGRELDIR)\
55 GLGENDIR=$(GLGENDIR)/$(DEBUGRELDIR) GLOBJDIR=$(GLOBJDIR)/$(DEBUGRELDIR)\
56 PSGENDIR=$(PSGENDIR)/$(DEBUGRELDIR) PSOBJDIR=$(PSOBJDIR)/$(DEBUGRELDIR)
57
58debug: DEBUGDIRS
59	$(MAKE) $(DEBUGDEFS) default
60
61debugclean: DEBUGDIRS
62	$(MAKE) $(DEBUGDEFS) clean
63
64# Emacs tags maintenance.
65
66TAGS:
67	etags -t $(GLSRC)*.[ch] $(PSSRC)*.[ch]
68